High CPU usage
If you are experiencing high CPU usage on your site, there are a few possible ways WP Rocket could cause this:
Pages are not cached Make sure that WP Rocket is active and caches your pages:
Preload If your site has a lot of pages to preload and/or lacks enough server resources, preloading will cause a spike in CPU usage. If the spike causes a problem for your site you can try:
How to check if WP Rocket is caching your pages
- Limiting the number of sitemaps to be preloaded by un-checking WP Rocket's automatic sitemap detection from your SEO plugin (e.g. Yoast) and specifying only the most important ones to be preloaded:
- Increasing the crawl interval
- Deactivating sitemap-based preloading
- If deactivating only sitemap-based preloading doesn't help, disable preload completely
- Increasing the Cache Lifespan to avoid too frequent entire cache deletion and preloading
- Setting up cron jobs to clear and preload the cache during periods of low server activity
If disabling or limiting preload doesn't resolve the issue, try the steps below as well.
Remove Unused CSS
This feature scans your pages to collect and process the CSS and JS files. This can cause a spike in CPU , especially if there are a lot of files and pages to process. Try disabling this option and see if the CPU returns to normal.
If you see any of the following spiking in your usage logs, it points to this feature: