- Plesk for Linux
- WordPress website example.com is inaccessible. The following error is shown in browser:
CONFIG_TEXT: Error 500
- 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 wordfence-waf.php referred by user.ini of WordPress website is missing. As result WordPress engine fails to run website.
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/example/public_html/example.com/wordfence-waf.php":
/var/www/vhosts/example.com/httpdocs/.user.ini: auto_prepend_file = '/home2/example/public_html/example.com/wordfence-waf.php'
- Connect to the server via SSH.
- Open the file
/var/www/vhosts/example.com/httpdocs/.user.iniwith command line text editor and comment out the line containing reference to wordfence-waf.php:
CONFIG_TEXT: auto_prepend_file = '/home2/example/public_html/example.com/wordfence-waf.php'
CONFIG_TEXT: ;auto_prepend_file = '/home2/example/public_html/example.com/wordfence-waf.php'
- Save file and close text editor.