Title: Can&#039;t flush cache
Last modified: August 22, 2016

---

# Can't flush cache

 *  Resolved [Simon Blackbourn](https://wordpress.org/support/users/lumpysimon/)
 * (@lumpysimon)
 * [11 years, 8 months ago](https://wordpress.org/support/topic/cant-flush-cache-1/)
 * I’m getting an error message when clicking ‘Flush cache’:
 * `Notice: Could not delete any cached sitemaps. Please manually check the cache
   directory.`
 * The files are definitely in the cache folder, I can manually delete them via 
   FTP, they then get re-generated again, but for some reason the plugin can’t see
   them. All folder and file permissions are correct.
 * Any ideas?
 * Thanks
    Simon
 * [https://wordpress.org/plugins/bwp-google-xml-sitemaps/](https://wordpress.org/plugins/bwp-google-xml-sitemaps/)

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

 *  Plugin Author [Khang Minh](https://wordpress.org/support/users/oddoneout/)
 * (@oddoneout)
 * [11 years, 8 months ago](https://wordpress.org/support/topic/cant-flush-cache-1/#post-5415169)
 * Hi Simon,
 * Are you using a custom cache folder? If so, how are you setting it?
 *  Thread Starter [Simon Blackbourn](https://wordpress.org/support/users/lumpysimon/)
 * (@lumpysimon)
 * [11 years, 8 months ago](https://wordpress.org/support/topic/cant-flush-cache-1/#post-5415195)
 * No, it’s the default one.
 *  Thread Starter [Simon Blackbourn](https://wordpress.org/support/users/lumpysimon/)
 * (@lumpysimon)
 * [11 years, 8 months ago](https://wordpress.org/support/topic/cant-flush-cache-1/#post-5415231)
 * Just got the same problem on a site on another server, here’s the error message
   it’s showing when I try to flush the cache:
 * > Warning: opendir(/): failed to open dir: Permission denied in /srv/[my-domain-
   > here]/public/wp-content/plugins/bwp-google-xml-sitemaps/includes/class-bwp-
   > simple-gxs.php on line 1745
 * Hope that’s useful!
 *  Plugin Author [Khang Minh](https://wordpress.org/support/users/oddoneout/)
 * (@oddoneout)
 * [11 years, 8 months ago](https://wordpress.org/support/topic/cant-flush-cache-1/#post-5415232)
 * Hmm look like opendir restriction is in effect, you will probably have to add
   the cache folder to the openbase dir configuration directive in `php.ini`. You
   should use a custom cache directory on situation like this I believe.
 * Will see what I can do about this though.
 *  Thread Starter [Simon Blackbourn](https://wordpress.org/support/users/lumpysimon/)
 * (@lumpysimon)
 * [11 years, 8 months ago](https://wordpress.org/support/topic/cant-flush-cache-1/#post-5415236)
 * That error message is from a new server with a different config. The bug is also
   affecting all my other sites on different servers on which flushing the cache
   previously worked fine.
 *  [meeble](https://wordpress.org/support/users/meeble/)
 * (@meeble)
 * [11 years, 7 months ago](https://wordpress.org/support/topic/cant-flush-cache-1/#post-5415250)
 * I am getting this same error on 2 of my WordPress 4 sites. Any updates on a fix?
 *  Plugin Author [Khang Minh](https://wordpress.org/support/users/oddoneout/)
 * (@oddoneout)
 * [11 years, 7 months ago](https://wordpress.org/support/topic/cant-flush-cache-1/#post-5415255)
 * What if you guys change the cache directory to for example `/wp-content/cache`?
 * [@simon](https://wordpress.org/support/users/simon/) does that happen right after
   you update the plugin, or any recent changes to existing servers’ config?
 *  Thread Starter [Simon Blackbourn](https://wordpress.org/support/users/lumpysimon/)
 * (@lumpysimon)
 * [11 years, 7 months ago](https://wordpress.org/support/topic/cant-flush-cache-1/#post-5415256)
 * I can’t think of anything changed on those servers that would affect this.
 * I will try running an older version of the plugin, then do an upgrade, and will
   let you know what happens. I’m a bit busy now so will do it later this week.

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

The topic ‘Can't flush cache’ is closed to new replies.

 * ![](https://s.w.org/plugins/geopattern-icon/bwp-google-xml-sitemaps_fffefe.svg)
 * [Better WordPress Google XML Sitemaps (support Sitemap Index, Multi-site and Google News)](https://wordpress.org/plugins/bwp-google-xml-sitemaps/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/bwp-google-xml-sitemaps/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/bwp-google-xml-sitemaps/)
 * [Active Topics](https://wordpress.org/support/plugin/bwp-google-xml-sitemaps/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/bwp-google-xml-sitemaps/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/bwp-google-xml-sitemaps/reviews/)

 * 8 replies
 * 3 participants
 * Last reply from: [Simon Blackbourn](https://wordpress.org/support/users/lumpysimon/)
 * Last activity: [11 years, 7 months ago](https://wordpress.org/support/topic/cant-flush-cache-1/#post-5415256)
 * Status: resolved