Title: Issue with wp-config.php
Last modified: April 7, 2024

---

# Issue with wp-config.php

 *  Resolved [fijisunshine](https://wordpress.org/support/users/fijisunshine/)
 * (@fijisunshine)
 * [2 years, 2 months ago](https://wordpress.org/support/topic/issue-with-wp-config-php/)
 * Great plugin!
 * For security reasons, I store wp-config.php outside of the default location of/
   public_html/ on my server. For this reason, WP Super Cache is giving me the following
   error:
 * Warning! _Could not update /home/redacted/public\_html/wp-config.php!_ WPCACHEHOME
   must be set in config file.
 * wp-config.php in /public_html/ correctly gives the location of the real wp-config.
   php on the server. And at the top of the real wp-config.php, WPCACHEHOME is properly
   set to the directory of the WP Super Cache plugin. WP_CACHE is also set to true.
 * Is there something that I should do to ensure WP Super Cache understands that
   the real wp-config.php isn’t in /public_html/ ?
 * Thank you

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

 *  Plugin Author [Donncha O Caoimh (a11n)](https://wordpress.org/support/users/donncha/)
 * (@donncha)
 * [2 years, 2 months ago](https://wordpress.org/support/topic/issue-with-wp-config-php/#post-17558963)
 * The plugin looks in public_html/../ for wp-config.php as well, but that’s not
   where you’re storing it, I presume? If you have a public_html/wp-config.php can
   you set WPCACHEHOME and WP_CACHE in there? They’re not sensitive data that needs
   to be protected.
 * Otherwise, I guess the simplest way to fix it is by adding code to skip writing
   the WPCACHEHOME in wp_cache_create_advanced_cache() in wp-cache.php
 * BTW – do you worry that all the sensitive data defined in wp-config.php is available
   to all the plugins you’re using? It defeats the purpose of moving wp-config.php
   out of public_html.
 *  Thread Starter [fijisunshine](https://wordpress.org/support/users/fijisunshine/)
 * (@fijisunshine)
 * [2 years, 2 months ago](https://wordpress.org/support/topic/issue-with-wp-config-php/#post-17560690)
 * Thank you for your excellent reply. I followed your instructions and moved the
   two lines regarding WP_CACHE and WPCACHEHOME to /public_html/wp-config.php and
   that fixed the issue.
 * WP Super Cache works perfectly now! Thank you
 *  Plugin Author [Donncha O Caoimh (a11n)](https://wordpress.org/support/users/donncha/)
 * (@donncha)
 * [2 years, 2 months ago](https://wordpress.org/support/topic/issue-with-wp-config-php/#post-17561534)
 * I’m very happy to hear it’s working well! 🙂

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

The topic ‘Issue with wp-config.php’ is closed to new replies.

 * ![](https://ps.w.org/wp-super-cache/assets/icon-256x256.png?rev=3506220)
 * [WP Super Cache](https://wordpress.org/plugins/wp-super-cache/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/wp-super-cache/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/wp-super-cache/)
 * [Active Topics](https://wordpress.org/support/plugin/wp-super-cache/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/wp-super-cache/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/wp-super-cache/reviews/)

 * 3 replies
 * 2 participants
 * Last reply from: [Donncha O Caoimh (a11n)](https://wordpress.org/support/users/donncha/)
 * Last activity: [2 years, 2 months ago](https://wordpress.org/support/topic/issue-with-wp-config-php/#post-17561534)
 * Status: resolved