Can’t Access WP-Admin due to Wordfence error

[ad_1]

Hi @sproutwebdev, thanks for sharing the error you’re seeing.

Had you only just installed, optimized the firewall or made some other changes on your server when this occurred? A possible cause is that the .htaccess file containing auto_prepend_file to include wordfence-waf.php has been placed somewhere else and not in document root. If you’re able to use WordPress CLI, the following command will find the location of the file:

find . -name ".htaccess" -exec grep -r -H "/your/path/to/wordfence-waf.php" {} \;

It is also possible for .user.ini or php.ini to be configured for this depending on your environment, but also check that wordfence-waf.php is in your site’s root folder too.

Naturally I can’t check which host or environment you’re on precisely, so I’ll provide the links below in case troubleshooting or alternative hosting provider setups may be appropriate to follow in your case:

https://www.wordfence.com/help/firewall/optimizing-the-firewall/#alternative-hosting-provider-setups

https://www.wordfence.com/help/firewall/optimizing-the-firewall/troubleshooting/

Let us know what you find out!
Peter.

Hi @wfpeter, the issue has been resolved. I reverted the domain to the old one and deactivated the Wordfence before changing the domain again. Thank you so much for the response.

 

This site will teach you how to build a WordPress website for beginners. We will cover everything from installing WordPress to adding pages, posts, and images to your site. You will learn how to customize your site with themes and plugins, as well as how to market your site online.

Buy WordPress Transfer