0 votes
6.6k views
by (1.3k points)

I have just changed the path in wp-config.php file then I got this error. I'm totally unknown what I do know. Please help..

Following error windows appears (see screengrab)

wp-load.php error
 

Warning: require_once(/srv/users/serverpilot/apps/example/public/wp-config.php): failed to open stream: Permission denied in /srv/users/serverpilot/apps/example/public/wp-load.php on line 37

Fatal error: require_once(): Failed opening required '/srv/users/serverpilot/apps/example/public/wp-config.php' (include_path='.:/opt/sp/php7.0/lib/php') in /srv/users/serverpilot/apps/example/public/wp-load.php on line 37

1 Answer

0 votes
by (10.0k points)

The error message might big, but the solution is so tiny.smiley This error is an outcome of degraded file permission level. Due to the 640 level permission to wp-config.php, the WordPress themes, plugins fails to change/save. Just change the file permission of wp-config file to 644. That's it. Done..! yes

How to do that,

  1. You can view file permission level via cPanel, FTP, FileZilla or CyberDuck
  2. Change the file permission to 644 for wp-config.php
  3. Done..!

File Permission Level

File Permission in FileZilla

UPDATE:

With reference to comment of Soundarya, we need take consider to check file permission of wp-config.php too (along with .htaccess). If you experience error as illustrated below, then probably it denote to check file permission of wp-config.php

AH01215: PHP Fatal error:  require_once(): Failed opening required '/home/username/public_html/wp-config.php' (include_path='.:/opt/cpanel/ea-php73/root/usr/share/pear') in /home/username/public_html/wp-load.php on line 37: /usr/local/cpanel/cgi-sys/ea-php73

The front-end error somewhat like below.
HTTP Error 500
In this case you need to change file permission of wp-config.php level to 644.

by (100 points)

Answer by luckybhumkar is very helpfull. It worked for me. But I changed file permissions of my wp-config.php.  Thank u so much.

by (10.0k points)
Thank-you Soundarya   :-)
...