Title: wp-config.php not found, require_once failed
Last modified: August 22, 2016

---

# wp-config.php not found, require_once failed

 *  [samtuke](https://wordpress.org/support/users/samtuke/)
 * (@samtuke)
 * [11 years, 4 months ago](https://wordpress.org/support/topic/wp-configphp-not-found-require_once-failed/)
 *     ```
       PHP Warning:  require_once(/wp-config.php): failed to open stream: No such file or directory in /srv/website.com/www/wp-content/plugins/redirect/redirect.php on line 16
       PHP Fatal error:  require_once(): Failed opening required '/wp-config.php' (include_path='.:/usr/share/php:/usr/share/pear') in /srv/website.com/www/wp-content/plugins/redirect/redirect.php on line 16
       ```
   
 * Had a look at the source code; applied a workaround by replacing the $_SERVER
   var with a hardcoded path to the wp-config.php file. Any idea why the default
   path is failing?
 * Sam.
 * [https://wordpress.org/plugins/redirection/](https://wordpress.org/plugins/redirection/)

Viewing 5 replies - 1 through 5 (of 5 total)

 *  Thread Starter [samtuke](https://wordpress.org/support/users/samtuke/)
 * (@samtuke)
 * [11 years, 4 months ago](https://wordpress.org/support/topic/wp-configphp-not-found-require_once-failed/#post-5669216)
 * Interestingly, even with a hardcoded url to /wp-config.php in /wp-content/plugins/
   redirect/redirect.php, I’m still getting the error…
 *  Plugin Author [John Godley](https://wordpress.org/support/users/johnny5/)
 * (@johnny5)
 * [11 years, 4 months ago](https://wordpress.org/support/topic/wp-configphp-not-found-require_once-failed/#post-5669462)
 * This does not look like the Redirection plugin.
 *  Thread Starter [samtuke](https://wordpress.org/support/users/samtuke/)
 * (@samtuke)
 * [11 years, 4 months ago](https://wordpress.org/support/topic/wp-configphp-not-found-require_once-failed/#post-5669509)
 * It does to me:
    `/wp-content/plugins/redirect/redirect.php` The cron errors appeared
   within minutes of enabling the plugin. I’m guessing that some assumption about
   the way the path is making the reference is causing the problem? But right now
   I don’t get why the hardcoded path fails also. No other part of wordpress has
   a problem finding the config file though so must be specific to Redirect I think.
 *  Plugin Author [John Godley](https://wordpress.org/support/users/johnny5/)
 * (@johnny5)
 * [11 years, 4 months ago](https://wordpress.org/support/topic/wp-configphp-not-found-require_once-failed/#post-5669543)
 * Yeah, that’s not the Redirection plugin – neither the directory nor the file 
   exist in Redirection. Are you thinking of another plugin?
 *  Thread Starter [samtuke](https://wordpress.org/support/users/samtuke/)
 * (@samtuke)
 * [11 years, 2 months ago](https://wordpress.org/support/topic/wp-configphp-not-found-require_once-failed/#post-5669654)
 * Yup you’re right, my bad. That trailing ‘ion’ escaped my attention. Sorry!

Viewing 5 replies - 1 through 5 (of 5 total)

The topic ‘wp-config.php not found, require_once failed’ is closed to new replies.

 * ![](https://ps.w.org/redirection/assets/icon-256x256.jpg?rev=983639)
 * [Redirection](https://wordpress.org/plugins/redirection/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/redirection/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/redirection/)
 * [Active Topics](https://wordpress.org/support/plugin/redirection/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/redirection/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/redirection/reviews/)

## Tags

 * [wp-config](https://wordpress.org/support/topic-tag/wp-config/)

 * 5 replies
 * 2 participants
 * Last reply from: [samtuke](https://wordpress.org/support/users/samtuke/)
 * Last activity: [11 years, 2 months ago](https://wordpress.org/support/topic/wp-configphp-not-found-require_once-failed/#post-5669654)
 * Status: not resolved