WordPress website on Plesk server is inaccessible: Error 500 PHP Fatal error:

Started by Suhitha, Today at 06:11 AM

Previous topic - Next topic

Suhitha

Question: WordPress website on Plesk server is inaccessible: Error 500 PHP Fatal error: Unknown: Failed opening required '/home/johndoe/public_html/example.com/wordfence-waf.php'


Applicable to:

  • Plesk for Linux


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 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

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

1.Connect to the server using SSH.

2.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:

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'
3.Save the file and close text editor.