Plugin Support
wfphil
(@wfphil)
Hi @very-well
After you optimize the Wordfence firewall you will see this warning in the firewall options:
If you’re moving to a new host or a new installation location, you may need to temporarily disable extended protection to avoid any file not found errors. Use this action to remove the configuration changes that enable extended protection mode or you can remove them manually.
Because you didn’t remove Extended protection from the firewall then this is now causing the fatal PHP error.
The code causing this will be in either a .user.ini file, php.ini file or a .htaccess file as follows:
.user.ini file or php.ini file
; Wordfence WAF
auto_prepend_file = '/var/www/vhosts/chapeuslisboetas.com/httpdocs/wp/wordfence-waf.php'
; END Wordfence WAF
.htaccess file:
<IfModule mod_php5.c>
php_value auto_prepend_file '/var/www/vhosts/chapeuslisboetas.com/httpdocs/wp/wordfence-waf.php'
</IfModule>
<IfModule mod_php7.c>
php_value auto_prepend_file '/var/www/vhosts/chapeuslisboetas.com/httpdocs/wp/wordfence-waf.php'
</IfModule>
Once you have found the code then delete it.
Next delete the wordfence-waf.php file from the root directory of your WordPress installation and optimize the firewall again.
I really appreciate your response, and it helps.
I did what you recommended, but the problem still remains … I can’t access the wp admin.
Can you help?
how do I clean the firewall? I just didn’t do it because I don’t know how to do it …
Plugin Support
wfphil
(@wfphil)
Hi @very-well
Please show your hosting provider my first reply and ask them for assistance in removing the value being set for the auto_prepend_file PHP directive.