Database size increases with Remove Unused CSS

Remove Unused CSS stores information in the database and in some scenarios it will grow quite large. This might seem alarming but MySQL is capable of storing and searching over a lot of data, as long as proper indexing is used on the columns that needs to be searched, which is the case for our tables.

We use these tables: 


This is where we store the Used CSS for every cached page of your site. This can grow large if:

  • There are many cached pages
  • There is a large amount of CSS per page
  • Options that create additional cache files are enabled - separate cache files for mobile devices, WebP Compatibility


Note: starting from WP Rocket 3.11, this table is unused but still kept empty to ensure compatibility.

This table was used to store the CSS and JavaScript resources from your site. Files that are reused across your site were only stored in the database once, but it could grow large if:

  • There are lots of CSS and JS files on your site
  • There are unique files loaded on each or many pages. A common example of this are the custom CSS files generated by Elementor for each post/page - they look like this:
  • There are files whose version changes frequently or on every page load - this means it will be added to the database every time the cache is created (when we check for new resources). This has the potential to cause a very large increase in DB size.  We have a related Github issue for this problem, with further details.
  • There are many pages on your site.

Every 30 days WP Rocket runs a cleanup to remove any unused resources from this table.

Known issues

  • Avada
    • Their optimization/combination options for CSS/JS should be disabled
Did this answer your question? Thanks for the feedback There was a problem submitting your feedback. Please try again later.