Cache folder is getting too big

In some cases, WP Rocket optimizations can exceed the disk or inode limits set by your hosting provider. This article lists which folders can be affected, the features that cause the problem in each folder, and how to solve the issue in each case.

Problem happens at wp-content/cache/min

This indicates an issue with the Combine JavaScript files feature. The /wp-content/cache/min/ folder will be full of JavaScript files.

A common issue is with the Combine JavaScript files option. We optimize inline JavaScript by default and if your site contains dynamic JavaScript, that is code which varies slightly from page to page, this will trigger a lot of files to be created. 


The possible solutions are turning off the  Combine JavaScript files option, or exclude the problematic, dynamic Inline JavaScript, as shown below:

  • Enable the Delay JavaScript execution feature, as this is the most powerful JavaScript optimization.

    When Delay JavaScript execution is active, the Combine JavaScript files feature is automatically deactivated for compatibility reasons.

    This is the  recommended solution because it avoids the cache folder size issue while optimizing the site further.
  • If you can't use the Delay JavaScript execution feature, you would need to exclude the affected script from the Combine JavaScript files feature instead.

    Please read this guide to identify which specific Inline JavaScript is causing the problem.
  • Alternatively, you can deactivate the Combine JavaScript files feature if your site uses HTTP/2 because combining files is not necessarily recommended.

Note that if the folder already has an excessive number of files in it, you may have to manually remove them via FTP. After doing that and disabling  Combine JavaScript files, the problem should resolve. 

Problem happens at /wp-content/cache/wp-rocket/used-css/

The Remove Unused CSS feature stores the resulting Used CSS files in the /wp-content/cache/wp-rocket/used-css/ folder.

WP Rocket optimizes the disk usage by detecting pages that can share the same Used CSS file, and by storing the Used CSS files with the GZIP extension.

However, if your site has too many pages with unique CSS, the space and inodes of this folder can grow a lot.


You can fix this problem by deleting the content of the  /used-css/ folder, and by limiting the Remove Unused CSS coverage, like this:

Problem happens at /wp-content/cache/wp-rocket/

The Page Caching automatic feature can trigger a disk or inode limit error as it stores the cache files and their respective sub-folders in the cache folder, at /wp-content/cache/wp-rocket/


The solutions to this problem is to clear the cache folder, and limit the pages or conditions under which this feature works:

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