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
Try changing file permissions of wp-config.php it might be given 640. Change file permission of wp-config.php or .htaccess file to 644.
Changing file permission of wp-config.php to 644 worked for me
Sai Prashanth
Updated on June 05, 2022Comments
-
Sai Prashanth almost 2 years
I am creating an Wordpress app server on apache and I am getting an error 500 while going to the url.So, I did check the httpd/logs/error_log and the following is the error
[Sun Jan 15 22:42:54.440349 2017] [:error] [pid 767] [client 10.203.116.148:9173] 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 Jan 15 22:42:54.440406 2017] [:error] [pid 767] [client 10.203.116.148:9173] PHP Fatal error: require_once(): Failed opening required '/var/www/html/wp-config.php' (include_path='.:/usr/share/pear:/usr/share/php') in /var/www/html/wp-load.php on line 37
I tried changing the file permissions for Wp-config.php but no luck, is there anything else I could do.
-
Savan Dholu over 4 years@Lakshmi I have set permission 777 & 644 of wp-config.php file & wp-load.php file but is not working.
-
Lakshmi about 4 years@SavanDholu Don't change permission of wp-load.php keep default permission only change wp-config.php file permission to 644