Symptoms
- WordPress website example.com is inaccessible with HTTP error 500.
- The following error is present Domains > example.com > Logs and in the log file
/var/www/vhosts/example.com/error_log
:AH01071: Got error 'PHP message: PHP Warning: Unknown: failed to open stream: No such file or directory in Unknown on line 0nPHP message: PHP Warning: Unknown: failed to open stream: No such file or directory in Unknown on line 0nPHP message: PHP Fatal error: Unknown: Failed opening required '/home/johndoe/public_html/example.com/wordfence-waf.php' (include_path='.:/opt/plesk/php/7.1/share/pear') in Unknown on line 0n', referer: http://www.example.com
Cause
The file wordfence-waf.php referred by user.ini of WordPress website is missing. As a result, WordPress engine fails to run website.
Resolution
- Connect to the server using SSH.
- Open the file
/var/www/vhosts/example.com/httpdocs/.user.ini
with command line text editor and comment out the line containing reference towordfence-waf.php
:Before edit:
auto_prepend_file = '/home2/example/public_html/example.com/wordfence-waf.php'
After edit:
;auto_prepend_file = '/home2/example/public_html/example.com/wordfence-waf.php'
- Save the file and close text editor.