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.
Solutions
The solution is either to exclude the problematic, dynamic Inline JavaScript, or turn off the Combine JavaScript files option.
- Read this guide to identify which specific Inline JavaScript is causing the problem.
- If your site uses HTTP/2, 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.
Solutions
You can fix this problem by deleting the content of the /used-css/
folder, and by limiting the Remove Unused CSS coverage, like this:
- Disable the Separate cache files for mobile devices feature as it will duplicate the number, or Used CSS files. Only recommended if your theme is fully responsive.
- Use the Conditionally Disable Remove Unused CSS approach.
Problem happens at /wp-content/cache/wp-rocket/yourdomain.com/
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/yourdomain.com/
.
Solutions
The solutions to this problem is to clear the cache folder, and limit the pages or conditions under which this feature works:
- Disable the Separate cache files for mobile devices feature to reduce the amount of cache files to half.
- Disable the WebP Compatibility as this Add-on will duplicate the number of cache files. For example, you can switch to one of the two Imagify methods to serve WebP images.
- Disable the User Cache option, or disable Page Caching for logged-in users while keeping only the optimizations on.
- Disable Page Caching for specific ages and posts.
- Deactivate Page Caching on all pages except for the selected URLs.