New Cleavr WordPress Cache Clear Plugin!

We’ve created a new WordPress plugin that lets you more easily clear Cache - either by a click of a button in the plugin settings or you can set to automatically clear cache when new content is added.

Well, maybe saying we “created” is a little misleading… We forked the very handy NGINX Cache plugin to make it work better with Cleavr as well as to get around an issue with the NGINX Cache plugin which is that it doesn’t work when assigning a site to a different server user. The plugin unfortunately only works for the default NGINX user that it’s running on, which in Cleavr’s case is the ‘cleavr’ user.

With our new forked version, you can simply supply the clear cache hook that’s provided in the NGINX Cached section of Cleavr.

Would you like to try out the beta version of the plugin?

Installation Instructions

Download and install plugin

Download beta plugin here

Add plugin to WordPress

In your WordPress admin section, go to the plugins section and click Add New.

Next, click on Upload Plugin and then upload the file that you downloaded previously.

Activate the plugin and then click on settings for the new Cleavr plugin.

Configure plugin settings

Add in the Clear Cache Trigger Hook that is found in Cleavr > Server > Site > FastCGI.

Note - you will need FastCGI to be enabled for your site for this plugin to work.

If you’d like the cache to be cleared every time content changes, enable the option and cache will be cleared automatically.

Clicking the ‘Clear Cache’ button will clear the cache for your site.

Help us make it better

Let us know if you run across any issues with the plugin by commenting below.

Want some additional features for the plugin? We’d love to hear them! Add a comment below and let us know your thoughts.


The Cleavr Clear Cache plugin is now live and available in the WordPress plugin library!

Thanks for those who helped us test the plugin and please do let us know if you have any suggestions on how we might improve it!

Awesome! Thanks so much for forking and improving this plugin for Cleavr users.

One thing that would be awesome if it could be improved, but not sure it’s possible, is that if you enable auto cache clearing on content changes (which I find it pretty essential in many cases) then when saving a simple single page instead of it being nearly instant, now takes several seconds (because I’m guessing the entire cache is being cleared at the same time?).

Thanks again for making this!


FastCGI cache works different than a Cache plugin in WordPress. I don’t think there is a way remove only a few “pages”. Or better from WordPress there is no way to address the specific files.

It would be great to keep the other cached files anyway. Because a bot or visitor need to access a page twice before the cached file is served.

You’re welcome!

It’s probably taking longer now due to the post request via the clear cache hook vs using the cache path where the operation would be quicker. We’ll see if there is a way to background or look for some other methods to make that part less noticeable

I’m also curious to see if we can target the cache for where the content is being changed, we’ll have to research that. :sunglasses:

Curious how you gonna do that. Check the document structure like /0/3a/ or /8/33/
This is kinda different from the slugs or ID’s in WordPress :wink:

We should be able to modify headers to better target specific pages. We haven’t researched it a ton but I’ve seen some solutions claim the ability. :slightly_smiling_face: