Title: Cache folder not being cleared
Last modified: November 19, 2019

---

# Cache folder not being cleared

 *  [richacinas](https://wordpress.org/support/users/richacinas/)
 * (@richacinas)
 * [6 years, 6 months ago](https://wordpress.org/support/topic/cache-folder-not-being-cleared/)
 * Hi there,
 * I’m using your plugin in order to clear fastcgi cache. I have the right folder
   setup on the plugin dashboard, and I got the permissions after playing with my
   folder permissions for a little while.
 * I save, everything OK.
 * However, when I hit purge, nothing happens on my folder. The message says that
   everything went ok, but it is not the case. The folder elements are intact.
 * What could the problem be?
 * Thanks a lot

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

 *  Thread Starter [richacinas](https://wordpress.org/support/users/richacinas/)
 * (@richacinas)
 * [6 years, 6 months ago](https://wordpress.org/support/topic/cache-folder-not-being-cleared/#post-12152190)
 * There is an error showing up on the upper part of the WordPress admin dashboard.
 * It says:
 * `Warning: Invalid argument supplied for foreach() in /var/www/html/sectorasegurador.
   local/wp-content/plugins/nginx-cache/nginx-cache.php on line 210`
 *  [LNN](https://wordpress.org/support/users/ewan-norman/)
 * (@ewan-norman)
 * [6 years, 4 months ago](https://wordpress.org/support/topic/cache-folder-not-being-cleared/#post-12334615)
 * +1 here, I confirm that the cache folder is not being purged anymore..
    I hope
   this plugin is not abandoned.
 *  [marv2](https://wordpress.org/support/users/marv2/)
 * (@marv2)
 * [6 years, 2 months ago](https://wordpress.org/support/topic/cache-folder-not-being-cleared/#post-12599854)
 * Hi there,
 * I am facing the same issue here.
 * With the same error as above.
 * Any fix for this?
 *  Thread Starter [richacinas](https://wordpress.org/support/users/richacinas/)
 * (@richacinas)
 * [6 years, 2 months ago](https://wordpress.org/support/topic/cache-folder-not-being-cleared/#post-12600047)
 * Hi again.
 * I fixed it, and can only confirm that it is a permission problem.
 * First of all, give your folder and subfolders a 777 permission just to make sure
   that the problem is this one:
 * `sudo chmod -R 777 your-cache-folder`
 * Then, reload the plugin page on you WP dashboard, and see if there is no message
   and if you can effectively purge. Hit the button and check if the folder emptied.
 * If it didn’t empty, then you could be missing the ngx_cache_purge module from
   your Nginx installation. This is a module that doesn’t come by default, and you
   have to make sure this module is installed before proceeding because deletion
   is carried out through some queries that depend on this.
 * This is an unofficial module, but it is well maintained and supported, and works
   like a charm. I’m using in production because I just have no other choice. The
   official one is nginx_cache_purge that comes with the Nginx with Nginx extras
   installation.
 *  Thread Starter [richacinas](https://wordpress.org/support/users/richacinas/)
 * (@richacinas)
 * [6 years, 2 months ago](https://wordpress.org/support/topic/cache-folder-not-being-cleared/#post-12600049)
 * Make sure about this steps, and then we can keep talking

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

The topic ‘Cache folder not being cleared’ is closed to new replies.

 * ![](https://ps.w.org/nginx-cache/assets/icon-256x256.jpg?rev=1029092)
 * [Nginx Cache](https://wordpress.org/plugins/nginx-cache/)
 * [Support Threads](https://wordpress.org/support/plugin/nginx-cache/)
 * [Active Topics](https://wordpress.org/support/plugin/nginx-cache/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/nginx-cache/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/nginx-cache/reviews/)

## Tags

 * [cache](https://wordpress.org/support/topic-tag/cache/)
 * [nginx](https://wordpress.org/support/topic-tag/nginx/)
 * [permission](https://wordpress.org/support/topic-tag/permission/)
 * [Purge](https://wordpress.org/support/topic-tag/purge/)

 * 5 replies
 * 3 participants
 * Last reply from: [richacinas](https://wordpress.org/support/users/richacinas/)
 * Last activity: [6 years, 2 months ago](https://wordpress.org/support/topic/cache-folder-not-being-cleared/#post-12600049)
 * Status: not resolved