Question

HTTP 500 error when accessing my website

I tried logging onto my website today and found that there was a 500 error instead with the log below for apache2. I’ve run an update but to no avail.

[Sun Jun 19 00:23:55.966140 2016] [mpm_prefork:notice] [pid 1002] AH00163: Apache/2.4.7 (Ubuntu) PHP/5.5.9-1ubuntu4.14 configured -- resuming normal operations
[Sun Jun 19 00:23:55.970722 2016] [core:notice] [pid 1002] AH00094: Command line: '/usr/sbin/apache2'
[Sun Jun 19 00:24:00.932874 2016] [:error] [pid 1013] [client 58.104.40.170:53340] PHP Warning:  require_once(/var/www/html/wp-config.php): failed to open stream: Permission denied in /var/www/html/wp-load.php on line 37
[Sun Jun 19 00:24:00.932968 2016] [:error] [pid 1013] [client 58.104.40.170:53340] PHP Fatal error:  require_once(): Failed opening required '/var/www/html/wp-config.php' (include_path='.:/usr/share/php:/usr/share/pear') in /var/www/html/wp-load.php on line 37
[Sun Jun 19 00:24:45.602576 2016] [:error] [pid 1012] [client 58.104.40.170:53930] PHP Warning:  require_once(/var/www/html/wp-config.php): failed to open stream: Permission denied in /var/www/html/wp-load.php on line 37
[Sun Jun 19 00:24:45.602743 2016] [:error] [pid 1012] [client 58.104.40.170:53930] PHP Fatal error:  require_once(): Failed opening required '/var/www/html/wp-config.php' (include_path='.:/usr/share/php:/usr/share/pear') in /var/www/html/wp-load.php on line 37
[Sun Jun 19 00:24:46.081614 2016] [:error] [pid 1014] [client 58.104.40.170:53931] PHP Warning:  require_once(/var/www/html/wp-config.php): failed to open stream: Permission denied in /var/www/html/wp-load.php on line 37
[Sun Jun 19 00:24:46.081732 2016] [:error] [pid 1014] [client 58.104.40.170:53931] PHP Fatal error:  require_once(): Failed opening required '/var/www/html/wp-config.php' (include_path='.:/usr/share/php:/usr/share/pear') in /var/www/html/wp-load.php on line 37
[Sun Jun 19 00:24:48.656707 2016] [:error] [pid 1015] [client 162.243.163.141:54440] PHP Warning:  require_once(/var/www/html/wp-config.php): failed to open stream: Permission denied in /var/www/html/wp-load.php on line 37
[Sun Jun 19 00:24:48.656810 2016] [:error] [pid 1015] [client 162.243.163.141:54440] PHP Fatal error:  require_once(): Failed opening required '/var/www/html/wp-config.php' (include_path='.:/usr/share/php:/usr/share/pear') in /var/www/html/wp-load.php on line 37

Submit an answer

This textbox defaults to using Markdown to format your answer.

You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!

Sign In or Sign Up to Answer

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

Want to learn more? Join the DigitalOcean Community!

Join our DigitalOcean community of over a million developers for free! Get help and share knowledge in Q&A, subscribe to topics of interest, and get courses and tools that will help you grow as a developer and scale your project or business.

The key part of this error message is:

Permission denied in /var/www/html/wp-load.php

The file’s permission are configured in a way that prevents Apache from accessing it. My first guess would be that the files are owned by root and the www-data user can not access them. You can change their owner by running:

  1. sudo chown -R www-data:www-data /var/www/html

Check out this tutorial for a full walkthrough on installing WordPress: