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:
  • 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, if a post or the Elementor CSS of a post is updated.
  • Updating WP Rocket, depending on the type of changes included in the new version.
  • After the dynamic lists of exclusions are automatically imported each week.

Related function: rocket_clean_domain

/cache/min

  • Manual triggering of Clear Cache (from the WP Rocket admin toolbar, or WP Rocket Dashboard tab)
  • Deactivation of CSS/JS Minify (not Combine)
  • Is NOT deleted when Clear Cache lifespan is triggered or via a cron job using ONLY rocket_clean_domain
  • Is deleted when clearing cache is triggered via a cron job using rocket_clean_domain AND rocket_clean_minify
  • 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
  • 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 Load CSS Asynchronously is enabled
  •    When a regeneration of Critical Path CSS is triggered

Related function: clean_critical_css()

/cache/used-css

  • Manual triggering of Clear Used CSS via the WP Rocket toolbar menu
  • Switching themes
  • Changing the items added to Remove Unused CSS's CSS safelist text area

For specific pages/posts:

  • Editing a post/page
  • Clearing a post/page cache
  • Editing/deleting terms
  • When the comment count changes

💡In some cases 3rd party plugins/themes/hosts could also be using our “clean” functions in their code

Did this answer your question? Thanks for the feedback There was a problem submitting your feedback. Please try again later.