Disable automatic cache clearing
Automatic cache management is one of WP Rocket’s most elaborate features.
WP Rocket carefully considers which actions performed on a WordPress site, or within the WP Rocket settings, should trigger clearing the entire site cache, or parts of it.
Please read the How often is the cache updated article to know the full list of scenarios when WP Rocket automatically clears the cache.
If you decide you want to modify this behavior, and stop WP Rocket from automatically clearing the cache, please continue reading this article.
Helper plugin
Once you’re sure you want to do this, install and activate this helper plugin.
Note: This plugin does not deactivate the Cache Lifespan setting. So if you want to prevent that as well, you must additionally set that to 0.
📥 Download (.zip): WP Rocket | Disable Cache Clearing
Developers: You can find the code for this plugin on GitHub.
Heads up! When you activate this plugin, WP Rocket will cache your pages, but will not clear the cache automatically when you make changes to them! This can easily result in outdated content on your website, so please handle with care!
Disable homepage clearing on manual page clearing
When you manually clear the cache of a post, WP Rocket automatically clears the cache of the homepage. Regardless of whether the above helper plugin is installed or not.
This default behavior of WP Rocket is intended because changes to subpages usually mean the homepage needs updating too.
However, if you want to deactivate this behavior, and prevent the homepage's cache from being cleared when another post is manually cleared, you can add to your site the following snippet:
add_filter( 'rocket_clean_home_after_clean_post', '__return_false' );