My wordpress installation is at
I have moved the wp-config.php file one level up to
and deleted the original file. However, I am getting a 500 error.
Within the wp-config.php there is a line that read:
if ( !defined('ABSPATH') ) define('ABSPATH', dirname(__FILE__) . '/'); /** Sets up WordPress vars and included files. */ require_once(ABSPATH . 'wp-settings.php');
I have read that wordpress should automatically read the wp-config if it's only one directory up. I am also using Nginx. Not sure why there is a problem here.
The solution at this thread for specifying the path
didn't work. I have tried:
<?php /** Absolute path to the WordPress directory. */ if ( !defined('ABSPATH') ) define('ABSPATH', dirname(__FILE__) . '/'); /** Location of your WordPress configuration. */ require_once(ABSPATH . '../var/www/wp-config.php');
I was able to retrieve the following troubleshooting information:
2018/10/29 18:54:09 [error] 10017#10017: *171699 FastCGI sent in stderr: "PHP message: PHP Warning: require_once(/var/www/wp-config.php): failed to open stream: Permission denied in /var/www/html/wp-config.php on line 8 PHP message: PHP Fatal error: require_once(): Failed opening required '/var/www/html/../wp-config.php' (include_path='.:/usr/share/php') in /var/www/html/wp-config.php on line 8" while reading response header from upstream,
In this instance I defined line 8 as
require_once(ABSPATH . '../wp-config.php');