PHP Warnings open_basedir

I am getting these warnings in the domain.tld.error.log file. How can I fix this issue? I am using PHP 7.4

I tried installing the Memcached and Redis cache but it did not work so I removed it. Don’t know if that’s relevant or not.

[Sun Jul 05 01:52:58.124162 2020] [proxy_fcgi:error] [pid 15709] [client X.X.X.X:36758] AH01071: Got error ‘PHP message: PHP Warning: file_exists(): open_basedir restriction in effect. File(/home/user/web/domain.tld/public_html/wp-content/db.php) is not within the allowed path(s): (/home/user/web/domain.tld/public_html:/home/user/web/domain.tld/public_shtml:/home/user/tmp:/var/www/html:/etc/phpmyadmin:/var/lib/phpmyadmin:/etc/roundcube:/var/lib/roundcube:/tmp:/bin:/usr/bin:/usr/local/bin:/usr/share:/opt) in /home/user/web/domain.tld/public_html/wp-includes/load.php on line 413’

I restored the backup from old hosting and it had a db.php file linking to the old hosting path. I removed that file and it looks like the warnings are no longer coming.

1 Like