• Resolved Betty Maszlay


    Dear Support,

    Because of migration issues I need to complete uninstall Wordfence. I’ve made all the steps you suggest:
    – Deleted “wordfence” directory from (/wp-content/plugins/)
    – Deleted “wflogs” directory from (/wp-content/)
    – Deleted user.ini and remove all code snippets wrapped by # Wordfence WAF and # END Wordfence WAF from .htaccess.
    – Drop all Wordfence database tables via phpMyAdmin.

    And STILL can’t remove wordfence-waf.php file from the root directory because after it site not works at all.

    Could you please help me what should I do?

    Thanks in advance!

    The page I need help with: [log in to see the link]

Viewing 6 replies - 1 through 6 (of 6 total)
  • Hi @papireper,

    Can you edit the file .htaccess or .user.ini and remove the following line?

    auto_prepend_file = ****

    The **** will be the file path to /wordfence-waf.php

    Once you’ve removed and saved that file, you can safely delete wordfence-waf.php.


    Thread Starter Betty Maszlay


    Hi Dave,

    Thank for your fast reply!

    As I wrote before, I’ve already edited .htaccess and deleted user.ini.

    .htaccess only contains basic infos now:

    # BEGIN WordPress
    <IfModule mod_rewrite.c>
    RewriteEngine On
    RewriteBase /
    RewriteRule ^index\.php$ – [L]
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteRule . /index.php [L]

    # END WordPress

    Any other suggestion…? 🙂


    Hi again,

    I think you may have a master value or another file that is referencing the wordfence-waf.php file.

    Can you try this:

    1. Create a file called info.php within your document root
    2. Put the script:


    3. Save the script, and open http://yourwebsite.com/info.php
    4. Look for auto_prepend_file

    For example: https://i.imgur.com/nGbksFv.png

    If there is a master value, or the local value is still wordfence-waf.php – you will need to check cPanel or ask your host why this value is still being set.


    Thread Starter Betty Maszlay


    Hi Dave,

    Thanks for suggestion!

    There is no value (auto_prepend_file no value). Can you check it, please?

    Hi again,

    So I took a look at it, and couldn’t find any references to wordfence-waf.php within it.

    You should remove info.php now that you no longer need it for testing.

    Can you tell me what error shows up (or if it is a blank page – can you look at your PHP error logs) after you delete that file?


    Thread Starter Betty Maszlay


    Dear Dave,

    Thanks for your efforts!

    Somehow my host provider deleted that file, so the problem solved.

    I’ve tried the hole process on another domain with other hosting and it worked so the problem should have been on the side of the host provider.

    Thank you again!

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘wordfence-waf.php’ is closed to new replies.