WordPress sites are not accessible: failed to open stream: Permission denied

Created:

2016-11-16 12:50:59 UTC

Modified:

2017-08-08 13:44:21 UTC

0

Was this article helpful?


Have more questions?

Submit a request

WordPress sites are not accessible: failed to open stream: Permission denied

Applicable to:

  • Plesk 12.5 for Linux

Symptoms

  1. WordPress sites show blank page.

  2. The following is found in panel.log:

    [error] [client 203.0.113.2] PHP Warning:  require_once(/var/www/vhosts/example.com/httpdocs/wp-config.php): failed to open stream: Permission denied in /var/www/vhosts/example.com/httpdocs/wp-load.php on line 37

    [error] [client 203.0.113.2] PHP Fatal error: require_once(): Failed opening required '/var/www/vhosts/example.com/httpdocs/wp-config.php' (include_path='.:') in /var/www/vhosts/example.com/httpdocs/wp-load.php on line 37
  3. Permissions for /var/www/vhosts/example.com/httpdocs/wp-config.php file are correct: 600

  4. example.com has FastCGI handler in Domains > example.com > PHP Settings , but in domain's configuration file it is Apache Module is setup:

    <IfModule sapi_apache2.c>

Cause

Domain configuration got corrupted. Domain is configured in Plesk to use FastCGI, but according to Apache configuration file, PHP is handled by Apache Module, not by FastCGI.

Resolution

Reconfigure domain:

    /usr/local/psa/admin/bin/httpdmng  --reconfigure-domain <domain_name>
Have more questions? Submit a request
Please sign in to leave a comment.