- Plesk for Linux
WordPress website example.com is inaccessible. The following error is shown in browser:
The following error is present in /var/www/vhosts/example.com/error_log:
CONFIG_TEXT: AH01071: Got error 'PHP message: PHP Warning: Unknown: failed to open stream: No such file or directory in Unknown on line 0\nPHP message: PHP Warning: Unknown: failed to open stream: No such file or directory in Unknown on line 0\nPHP 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 0\n', referer: http://www.example.com
File from error message is missing from file system /home/johndoe/public_html/example.com/wordfence-waf.php:
# stat /home/johndoe/public_html/example.com/wordfence-waf.php
Cannot stat: No such file or directory
The only file that refers to missing "wordfence-waf.php" is the file /var/www/vhosts/example.com/httpdocs/.user.ini:
# grep -ri "/home2/lysette/public_html/lysetteoffley.com/wordfence-waf.php":
/var/www/vhosts/example.com/httpdocs/.user.ini: auto_prepend_file = '/home2/lysette/public_html/example.com/wordfence-waf.php'
File wordfence-waf.php referred by user.ini of WordPress website is missing. As result WordPress engine fails to run website.
- Connect to the server via SSH.
- Open the file /var/www/vhosts/example.com/httpdocs/.user.ini with command line text editor and comment out the line containing reference to wordfence-waf.php:
auto_prepend_file = '/home2/lysette/public_html/example.com/wordfence-waf.php'
;auto_prepend_file = '/home2/lysette/public_html/example.com/wordfence-waf.php'
- Save file and close text editor.