Title: open_basedir restriction
Last modified: September 10, 2021

---

# open_basedir restriction

 *  [vespino](https://wordpress.org/support/users/vespino/)
 * (@vespino)
 * [4 years, 9 months ago](https://wordpress.org/support/topic/open_basedir-restriction-5/)
 * I have been getting these errors on sites hosted on my server for a while now:
 * [09-Sep-2021 18:48:05 UTC] PHP Warning: file_exists(): open_basedir restriction
   in effect. File(/wp-cache-blog17f7cbb9913f660d72e8e34c84e76cd5.php) is not within
   the allowed path(s): (/home/***/domains/***/:/home/***/domains/_codebase:/home/***/
   php_errors/:/tmp) in /home/***/domains/***/public_html/wp-content/plugins/wp-
   super-cache/wp-cache-phase2.php on line 100
 * What could be causing these errors?

Viewing 15 replies - 1 through 15 (of 40 total)

1 [2](https://wordpress.org/support/topic/open_basedir-restriction-5/page/2/?output_format=md)
[3](https://wordpress.org/support/topic/open_basedir-restriction-5/page/3/?output_format=md)
[→](https://wordpress.org/support/topic/open_basedir-restriction-5/page/2/?output_format=md)

 *  Thread Starter [vespino](https://wordpress.org/support/users/vespino/)
 * (@vespino)
 * [4 years, 8 months ago](https://wordpress.org/support/topic/open_basedir-restriction-5/#post-14900261)
 * No idea?
 *  Plugin Author [Donncha O Caoimh (a11n)](https://wordpress.org/support/users/donncha/)
 * (@donncha)
 * [4 years, 7 months ago](https://wordpress.org/support/topic/open_basedir-restriction-5/#post-15019400)
 * I think you should reset the plugin configuration. There may be something broken
   there. You’ll find a form at the end of the Advanced settings page to do this.
 *  Thread Starter [vespino](https://wordpress.org/support/users/vespino/)
 * (@vespino)
 * [4 years, 7 months ago](https://wordpress.org/support/topic/open_basedir-restriction-5/#post-15024038)
 * I will give this a try on one of my websites.
 *  Thread Starter [vespino](https://wordpress.org/support/users/vespino/)
 * (@vespino)
 * [4 years, 7 months ago](https://wordpress.org/support/topic/open_basedir-restriction-5/#post-15025739)
 * Same result, after a few hours I’m getting the error again.
 *  [Grant McN](https://wordpress.org/support/users/grant-mcn/)
 * (@grant-mcn)
 * [4 years, 6 months ago](https://wordpress.org/support/topic/open_basedir-restriction-5/#post-15121254)
 * Hello,
 * I am getting the same error as vespino and tried the suggested fix but it does
   not work. Please can you suggest something else we could try? [@vespino](https://wordpress.org/support/users/vespino/),
   were you able to resolve this and, if so, how?
 * Thanks,
 * Grant
 *  Thread Starter [vespino](https://wordpress.org/support/users/vespino/)
 * (@vespino)
 * [4 years, 6 months ago](https://wordpress.org/support/topic/open_basedir-restriction-5/#post-15121272)
 * [@grant-mcn](https://wordpress.org/support/users/grant-mcn/) no solution yet.
 *  [Grant McN](https://wordpress.org/support/users/grant-mcn/)
 * (@grant-mcn)
 * [4 years, 6 months ago](https://wordpress.org/support/topic/open_basedir-restriction-5/#post-15121313)
 * [@donncha](https://wordpress.org/support/users/donncha/) Please can you help 
   us?
 * Thanks
 *  Plugin Author [Donncha O Caoimh (a11n)](https://wordpress.org/support/users/donncha/)
 * (@donncha)
 * [4 years, 6 months ago](https://wordpress.org/support/topic/open_basedir-restriction-5/#post-15152287)
 * When this happens again, I need you to debug it. Edit wp-admin/index.php and 
   under the line `require_once __DIR__ . '/admin.php';` add this temporarily:
 * `wp_mail( "your email", "DEBUG: cache path", "cache path: " . $cache_path );`
 * Change “your email” to your own email address. And then load your dashboard. 
   You should be sent an email with the cache path in it. Make sure to undo and 
   save wp-admin/index.php again as you will get an email every time someone loads
   the dashboard.
 * Do you see “cache path: /x/y/z/cache/” where /x/y/z/ is the path to where you
   have the cache directory?
    Or do you only see “cache path:” ?
 * What you’re seeing leads me to believe your configuration somehow got corrupted
   and the path to the cache directory has been overwritten.
 *  Plugin Author [Donncha O Caoimh (a11n)](https://wordpress.org/support/users/donncha/)
 * (@donncha)
 * [4 years, 6 months ago](https://wordpress.org/support/topic/open_basedir-restriction-5/#post-15152413)
 * If you try the development version of the plugin which you can find on the following
   page, you’ll be shown an error as a HTML comment at the end of any page if the
   plugin detects a broken configuration.
 * [http://odd.blog/y/2o](http://odd.blog/y/2o)
 * The error is “WARNING! Caching disabled. Configuration corrupted. Reset configuration
   on Advanced Settings page.”
 * If you get that warning, take a look at wp-content/wp-cache-config.php
 * Here’s a sample config file that should look similar to what your config file
   looks like for comparison.
    [https://github.com/Automattic/wp-super-cache/blob/master/wp-cache-config-sample.php](https://github.com/Automattic/wp-super-cache/blob/master/wp-cache-config-sample.php)
 *  Thread Starter [vespino](https://wordpress.org/support/users/vespino/)
 * (@vespino)
 * [4 years, 6 months ago](https://wordpress.org/support/topic/open_basedir-restriction-5/#post-15152442)
 * [@donncha](https://wordpress.org/support/users/donncha/) Nothing out of the ordinary
   I guess > cache path: /path/to/domain/wp-content/cache/
 *  Plugin Author [Donncha O Caoimh (a11n)](https://wordpress.org/support/users/donncha/)
 * (@donncha)
 * [4 years, 6 months ago](https://wordpress.org/support/topic/open_basedir-restriction-5/#post-15152459)
 * [@vespino](https://wordpress.org/support/users/vespino/) Did you see that WARNING
   text already? Is that what $cache_path was when the WARNING text was shown in
   the HTML of your website? Or is it what it normally is? That looks normal to 
   me.
 *  Thread Starter [vespino](https://wordpress.org/support/users/vespino/)
 * (@vespino)
 * [4 years, 6 months ago](https://wordpress.org/support/topic/open_basedir-restriction-5/#post-15152466)
 * [@donncha](https://wordpress.org/support/users/donncha/) sorry, I don’t understand
   your question.
 *  Plugin Author [Donncha O Caoimh (a11n)](https://wordpress.org/support/users/donncha/)
 * (@donncha)
 * [4 years, 6 months ago](https://wordpress.org/support/topic/open_basedir-restriction-5/#post-15152478)
 * OK, disregard the above.
 * Next time you see the warning in your logs check wp-content/wp-cache-config.php
   and see if $cache_path is set to that “/path/to/domain/wp-content/cache/” path.
 *  Thread Starter [vespino](https://wordpress.org/support/users/vespino/)
 * (@vespino)
 * [4 years, 6 months ago](https://wordpress.org/support/topic/open_basedir-restriction-5/#post-15152486)
 * The file shows: $cache_path = WP_CONTENT_DIR . ‘/cache/’;
 *  Plugin Author [Donncha O Caoimh (a11n)](https://wordpress.org/support/users/donncha/)
 * (@donncha)
 * [4 years, 6 months ago](https://wordpress.org/support/topic/open_basedir-restriction-5/#post-15152505)
 * OK, and are you getting the “PHP Warning: file_exists(): open_basedir restriction
   in effect. File(/wp-cache-blog17f7c…” type warnings right now in your log files?

Viewing 15 replies - 1 through 15 (of 40 total)

1 [2](https://wordpress.org/support/topic/open_basedir-restriction-5/page/2/?output_format=md)
[3](https://wordpress.org/support/topic/open_basedir-restriction-5/page/3/?output_format=md)
[→](https://wordpress.org/support/topic/open_basedir-restriction-5/page/2/?output_format=md)

The topic ‘open_basedir restriction’ 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/)

 * 40 replies
 * 4 participants
 * Last reply from: [vespino](https://wordpress.org/support/users/vespino/)
 * Last activity: [4 years, 4 months ago](https://wordpress.org/support/topic/open_basedir-restriction-5/page/3/#post-15292410)
 * Status: not resolved