Managing WP Rocket Cache: How to Prevent Automatic Clearing

WP Rocket is a popular caching plugin for WordPress that enhances website speed and performance by reducing load times and optimizing resources. It simplifies the complex caching process by automatically generating static page versions, reducing server processing, and improving user experience. WP Rocket offers page caching, browser caching, and GZIP compression to minimize bandwidth usage and accelerate page delivery.
If you use the WP Rocket plugin on a site that also runs WooCommerce for e-commerce functions, you may notice that the generated cache from the WP Rocket plugin is being cleared too often during checkout.
If you use a full-page caching plugin, having a reliably generated cache that is not frequently cleared will cause CPU and PHP-FPM processes on your site’s server to regenerate the cache.
WP Rocket provides a helper plugin that can be installed to disable all automatic cache clearing on a site. Using the plugin will mean that the cache will not be cleared automatically if the content is updated on the site, so the cache must be cleared directly.
MainWP does have an extension for cache control over all connected sites, and it supports the WP Rocket plugin.
Hopefully the bug for clearing cache automatically during checkout is resolved in a future release for the moment, if you have a decent number of orders being created on the site, then it may be best to disable all automatic cache clearing. The issue seems to happen when a draft order is created as part of checkout and logged for the automatic caching clearing to be run. Automatic cache clearing is solid when it does not cause issues with it running too frequently on a site.
Useful Links
https://docs.wp-rocket.me/article/78-how-often-is-the-cache-updated
https://docs.wp-rocket.me/article/137-disable-automatic-cache-clearing
https://docs.wp-rocket.me/article/53-clear-wp-rocket-cache
Share
Manage Unlimited WordPress Sites from One Dashboard!
- Privacy-first, Open Source, Self-hosted
- Easy Client Management
- 15+ & 30 + Premium Add-ons
- Bulk Plugins & Themes Management