When Does WP Rocket Delete Which Files?
Below you'll find the specific triggers which cause the contents of each of WP Rocket's folders to be deleted.
/cache/www.example.com
- Clear Cache lifespan
- Only files older than the specified lifespan will be deleted.
- When WP Rocket settings are changed
- Automatic triggers:
- See our guide: How Often is the Cache Updated
- View the related code on GitHub
- Manual triggering of Clear Cache (from the WP Rocket admin toolbar, or WP Rocket Dashboard tab)
- When the cache is cleared by calling rocket_clean_domain
- Can also be triggered by hosting/caching compatibilities to keep the caches in sync (e.g. on WP Engine and others )
- When Elementor's CSS Print Method is set to External File, and the Elementor CSS of a post is updated.
Related function: rocket_clean_domain
/cache/min
- Manual triggering of Clear Cache (from the WP Rocket admin toolbar, or WP Rocket Dashboard tab)
- If you change the CSS/JS Minify/Combine options
- ❗️Is NOT deleted when Clear Cache lifespan is triggered or via a cron job using rocket_clean_domain
- Beaver builder cache clear
- When Elementor's CSS Print Method is set to External File, and the Elementor CSS in a post is updated, the CSS files in this folder are deleted.
Related function: rocket_clean_minify
/cache/busting
- Manual triggering of Clear Cache (from the WP Rocket admin toolbar, or WP Rocket Dashboard tab)
- ❗️ Is NOT deleted when Clear Cache lifespan is triggered or via a cron job using rocket_clean_domain
- Beaver builder cache clear
- When Elementor's CSS Print Method is set to External File, and the Elementor CSS in a post is updated, the CSS files in this folder are deleted.
Related function: rocket_clean_cache_busting
/cache/critical-css
- When the theme is changed
- When Optimize CSS delivery is enabled
- When a regeneration of CPCSS is triggered
Related function: clean_critical_css()
💡In some cases 3rd party plugins/themes/hosts could also be using our “clean” functions in their code