Joho the Blog » How to fix the WordFence wordfence-waf.php problem
EverydayChaos
Everyday Chaos
Too Big to Know
Too Big to Know
Cluetrain 10th Anniversary edition
Cluetrain 10th Anniversary
Everything Is Miscellaneous
Everything Is Miscellaneous
Small Pieces cover
Small Pieces Loosely Joined
Cluetrain cover
Cluetrain Manifesto
My face
Speaker info
Who am I? (Blog Disclosure Form) Copy this link as RSS address Atom Feed

How to fix the WordFence wordfence-waf.php problem

My site has been down while I’ve tried to figure out (i.e., google someone else’s solution) to a crash caused by WordFence, an excellent utility that, ironically, protects your WordPress blog from various maladies.

The problem is severe: Users of your blog see naught but an error message of this form:

Fatal error: Unknown: Failed opening required ‘/home/dezi3014/public_html/wordfence-waf.php’ (include_path=’…/usr/lib/php /usr/local/lib/php’) in Unknown on line 0

The exact path will vary, but the meaning is the same. It is looking for a file that doesn’t exist. You’ll see the same message when you try to open your WordPress site as administrator. You’ll see it even when you manually uninstall WordPress by logging into your host and deleting the wordfence folder from the wp-content/plugins folder

If you look inside the wordfence-waf.php file (which is in whatever folder you’ve installed WordPress into), it warns you that “Before removing this file, please verify the PHP ini setting `auto_prepend_file` does not point to this.”

Helpful, except my php.ini file doesn’t have any reference to this. (I use MediaTemple.com as my host.) Some easy googling disclosed that the command to look for the file may not be in php.ini, but may be in .htaccess or .user.ini instead. And now you have to find those files.

At least for me, the .user.ini file is in the main folder into which you’ve installed WordPress. In fact, the only line in that file was the one that has the “auto_prepend_file” command. Remove that line and you have your site back.

I assume all of this is too obvious to write about for technically competent people. This post is for the rest of us.

Previous: « || Next: »

20 Responses to “How to fix the WordFence wordfence-waf.php problem”

  1. THANK YOU! Removing the stuff in the ini was the solution. Saved my hide :D

  2. Made my day! Thanks for letting me know.

  3. Thanks so much for this quick and simple advice – exactly what i needed, and worked perfectly! ?

  4. Big thumbs up my friend – thank you

    P

  5. Thanks for this! I ran into this error after pulling a live site down via Local.

  6. Hello, you are correct. Cpanel has released an official fix for this issue:

    https://support.cpanel.net/hc/en-us/articles/4407568131351-WordFence-WAF-causes-500-error-after-changing-the-name-of-a-cPanel-Account-or-transferring-a-cPanel-account

    I hope this helps.

  7. Thank you for the answer

  8. Thank you so much, fixed it right up!

  9. I thought I destroyed everything right before midnight (even the Backup of my hoster didn’t work lol) but thanks to you I could fix it in a few minutes and sleep well, thank you so much!

  10. It was htaccess for me, thanks very much!

  11. Thank you so much!!

  12. gracias desde argentina!
    thank you from Argentina!

  13. De nada! And I was just this morning talking with someone about how much my wife and I enjoyed the week we spent in Argentina a few years ago, visiting our son and daughter-in-law who lived in Buenos Aires for a year. Beautiful city, lovely people.

  14. THANK YOU! A client’s site went down. Wordfence was my first suspect. Sure enough, the site’s error log displayed that message… and your post had the quick fix I needed.

  15. Thank You, it was very hard to find the fix thanks a lot, your info saved my website

  16. I solved my problem by deleting the .user.ini file. Thank you.

  17. Thank you so much… saved my day :)

  18. I just changed the domain in there.. I got the error as I was switching to a new domain. Thanking you

  19. Many thanks! that worked for me.

  20. Good grief, I was having a heart attack! Woke up in the middle of the night to work on my site. Spend 2.5 hours, then lost everything. This saved the day! Thank you!

Leave a Reply

Comments (RSS).  RSS icon