- The best WP Rocket settings are the safe defaults plus a few tested extras, not every box ticked at once.
- In November 2026, attackers began exploiting a WP Rocket flaw in versions before 3.24.2. Update first, then tune.
- Keep cache lifespan under 12 hours, so cached pages never carry expired form tokens.
- Delay JavaScript and Remove Unused CSS give the biggest gains and cause the most breakage, so add exclusions and test.
- Never run WP Rocket alongside another page cache plugin, including LiteSpeed Cache.
The best WP Rocket settings for most sites are: page caching with mobile cache on, a cache lifespan of 10 hours, CSS and JavaScript minified, JavaScript deferred, Delay JavaScript with exclusions for forms and checkout, and image lazy loading. Turn on Remove Unused CSS only after testing. Change one setting at a time.
Across 250+ WordPress projects over 7+ years, I have cleaned up plenty of sites where someone switched on every WP Rocket option in one go. The PageSpeed score jumped. Then the contact form stopped sending, the menu stopped opening on phones, or checkout froze on the payment step. Nobody connected it to the speed change for days. Most owners tune WP Rocket settings on their own, all at once, and that’s where the real cost begins.
What Are the Best WP Rocket Settings?
The best WP Rocket settings are the ones that make your site faster without breaking anything a visitor uses. WP Rocket already turns on page caching, browser caching and GZIP compression when you activate it, so much of the work is done. The settings you choose after that fall into three groups. Safe settings, such as mobile cache, minify CSS and lazy loading images, rarely cause trouble. Test-first settings, such as Delay JavaScript and Remove Unused CSS, give the biggest gains but can break menus, sliders, forms and checkout. Finally, a few settings, such as combining JavaScript files, are best left off on modern hosting.
That grouping matters more than any single checkbox in your WP Rocket settings. Turn on the safe group first, then add test-first settings one at a time, checking the site after each change.
The tabs you will actually use
For most WP Rocket settings, you will spend your time in four tabs: Cache, File Optimization, Media and Preload. Advanced Rules and Database matter less day to day. The Add-ons tab connects Cloudflare and other services. Heartbeat controls how often WordPress pings the server from the dashboard. If you only have ten minutes for WP Rocket settings, get Cache and Media right first, because they carry the least risk.
Pro tip: Before changing any WP Rocket settings, export your current settings from the Tools tab. If a change breaks the site, you can import the old file and be back in seconds.
Before tuning any WP Rocket settings, though, make sure your copy of WP Rocket is safe to run.
First, Check Your WP Rocket Version
Check your WP Rocket version before touching any WP Rocket settings, because versions before 3.24.2 contain a flaw that attackers are actively exploiting. Go to Plugins in your dashboard and look at the version number under WP Rocket. If it is below 3.24.2, update now. WP Rocket is a premium plugin, so updates need an active licence. If you cannot update straight away, turn off “LazyLoad for CSS background images” and “Host Google Fonts locally” in the Media tab, because those are the two paths attackers use. According to BleepingComputer, both options are off by default, so sites on default WP Rocket settings were not exposed.
Updating closes the hole, but no change to WP Rocket settings cleans up a site that was already hit. That is the part most owners skip.
If either feature was on before you updated
As BleepingComputer reports, “updating to a safe version does not remove previously planted files.” So if either feature was switched on and you were below 3.24.2 after 25 November, check for trouble. Look for unfamiliar PHP files in wp-content and uploads, new admin users and unexpected scheduled tasks. Also review your server access logs for odd requests. If you find anything suspicious, follow a full cleanup, not just a plugin update. The hacked WordPress site guide walks through the checks in order.
What most guides get wrong: they treat a security update as the end of the story. It closes the door, but anyone who already walked in may have left a back door of their own.
With the version sorted, the quick check below narrows down which settings suit your site.
Check It: Which WP Rocket Settings Fit Your Site?
You can find the right WP Rocket settings for your site by answering up to three questions about your hosting, your version and what your site needs to do. The first question checks your WP Rocket version, because an outdated copy needs attention before any tuning. The next question looks at your host, because WP Rocket on a LiteSpeed server often doubles up on work the server already does. The last question looks at what the site runs, such as a store, forms or a page builder, because those decide which exclusions you need. Each path ends with a recommended setup, a clear next step and a way to get a second opinion.
It takes under a minute. It will not replace testing your WP Rocket settings on your own site, but it tells you where to start.
Whatever your result, the nine WP Rocket settings below cover the choices that matter.
9 WP Rocket Settings to Get Right
The nine WP Rocket settings to get right cover caching, file optimization, media, preloading and housekeeping, in the order you should set them. The first four are low risk and suit almost every site. The next three give the largest speed gains, but they need testing and exclusions. The last two keep the site running smoothly over time. Work through them one at a time, and after each change, open the site in a private window and click through the pages that matter most: the homepage, a key service or product page, your contact form and, for stores, checkout. That habit catches problems in minutes instead of days.
Keep a short note of each change to your WP Rocket settings and the date. If something breaks a week later, that list tells you exactly where to look.
1. Turn on mobile cache
Among the Cache tab WP Rocket settings, enable caching for mobile devices first. Most visitors arrive on phones, and Google ranks the mobile version of your site. Leave "separate cache files for mobile devices" off unless your theme serves different HTML to phones, which most modern themes do not.
2. Keep cache lifespan at 10 hours
Cache lifespan sets how long a cached page lives before WP Rocket rebuilds it. WP Rocket's cache lifespan documentation says "the default value for Cache Lifespan is 10 hours," and that default is deliberate. The section below explains why raising it is one of the most common mistakes I see.
3. Minify CSS and JavaScript, but do not combine JavaScript
In File Optimization, turn on Minify CSS and Minify JavaScript. They strip spaces and comments with little risk. Leave "Combine JavaScript files" off. On modern HTTP/2 hosting, combining brings little benefit and often breaks scripts that must load in a set order.
4. Lazy load images and iframes
In the Media tab, enable LazyLoad for images and for iframes and videos, and turn on "Replace YouTube iframe with preview image." Also enable "Add missing image dimensions," which reduces layout shift. However, exclude your main hero image from lazy loading, because delaying it slows your Largest Contentful Paint.
Already past the safe settings and still slow?
The next three settings are where most sites gain the most, and where most break. See how WordPress speed optimization works.
5. Load JavaScript deferred
Turn on "Load JavaScript deferred." This lets the page render before scripts run. It is usually safe, but if something breaks, add jQuery or the affected script to the exclusions box. Many older themes and plugins still expect jQuery to load early.
6. Delay JavaScript execution, with exclusions
"Delay JavaScript execution" holds scripts until the visitor scrolls, taps or moves the mouse. It is often the biggest single gain for Interaction to Next Paint and PageSpeed scores. It is also the setting that breaks menus, sliders, cookie banners, forms and payment fields. Use WP Rocket's one-click exclusions for your plugins, then add any script that must work immediately to the exclusion list.
7. Test Remove Unused CSS on staging first
Remove Unused CSS strips stylesheet rules each page does not use, which can cut CSS weight sharply on page builder sites. However, it can also remove styles that only appear after a click, such as dropdowns, popups and tabs. Test it on staging, check interactive elements on mobile, and add missing selectors to the CSS safelist. If it keeps breaking layouts, "Load CSS asynchronously" is a gentler option.
8. Preload the cache, links and fonts
In the Preload tab, keep cache preloading on, so WP Rocket rebuilds pages before visitors request them. Enable link preloading, which fetches a page when a visitor hovers over its link. Also preload your main font files, which helps text appear sooner.
9. Schedule database cleanup with care
In the Database tab, schedule a weekly cleanup of spam comments, trashed posts and expired transients. Be careful with revisions, because deleting them removes your undo history for content. Take a backup before the first cleanup, and leave anything you are unsure about unticked.
Of all nine, setting two causes the quietest and most expensive failures.
Why Cache Lifespan Matters More Than You Think
Cache lifespan matters because cached pages can carry security tokens that expire before the page does. Many WordPress forms, and some cart and login features, embed a token called a nonce in the page HTML to prove a request came from your site. WP Rocket's nonces and cache lifespan guide says nonces last "12 hours by default," and recommends a cache lifespan "below 12 hours." That is why its default is 10 hours. Owners often raise it to 24 hours or even switch it off to keep pages cached longer and protect their PageSpeed score. As a result, visitors start receiving pages with tokens that have already expired, and their forms quietly fail.
With those WP Rocket settings, the site owner rarely notices, because WP Rocket does not serve cached pages to logged-in users. The owner always sees a fresh, working form, while visitors see an error.
What a 7-day cache did to a working form
In November 2026 I traced a contact form that had gone silent for weeks. The site ran LiteSpeed Cache, whose default public cache lifetime is 7 days, not WP Rocket's 10 hours. So visitors loaded pages with tokens that had expired days earlier, and every submission failed with "Invalid nonce." Setting the cache lifetime to 10 hours and purging fixed it the same evening. The lesson applies to every cache plugin: whenever I set up or switch caching on a site, I check the cache lifetime before anything else.
Pro tip: After any cache change, submit your own contact form from a private window the next day, not just straight away. A form that only fails on day-old cached pages will pass a same-day test.
That example also raises a bigger question about which cache plugin belongs on your host.
Should You Use WP Rocket on LiteSpeed Hosting?
You usually should not use WP Rocket on LiteSpeed hosting, because the free LiteSpeed Cache plugin can cache at server level, which is faster than WP Rocket's file-based cache. Hosts such as Hostinger and many cPanel providers run LiteSpeed web servers. On those servers, LiteSpeed Cache serves pages before WordPress even loads. By contrast, on Apache or Nginx hosts such as SiteGround, Cloudways, Kinsta and WP Engine, WP Rocket is an excellent choice, with cleaner settings and safer defaults. Whichever you choose, run only one page cache plugin, and keep your WP Rocket settings or LiteSpeed settings in that one place. Two caching plugins fight over the same files and produce stale pages, broken styles and confusing errors.
Some managed hosts also have their own caching layer. In that case, check the host's guidance, because WP Rocket may switch off its own page cache automatically and only handle file optimization.
How to check which server you are on
Open your site in Chrome, press F12, go to the Network tab and reload. Click the first request and look at the response headers. A "server: LiteSpeed" header or "x-litespeed-cache" header means a LiteSpeed server. Your hosting dashboard or support team can also confirm it in one message.
Whichever plugin you use, the testing method for WP Rocket settings is the same.
How to Test WP Rocket Settings Safely
You test WP Rocket settings safely by changing one setting at a time and checking the site as a real visitor after each change. Start by exporting your current settings and noting your PageSpeed Insights mobile result. Then change one option, clear the cache and open the site in a private window. Click the menu on a phone, open a dropdown, submit a form and, on a store, add to cart and reach the payment step. Next, run PageSpeed Insights again. If something broke, undo that single change or add an exclusion. Then move on to the next setting. A staging site is ideal for the riskier features.
This slower approach to WP Rocket settings feels tedious, but it means every problem has one obvious cause. Changing five WP Rocket settings at once turns a two-minute fix into an afternoon of guesswork.
What to test after each change
After each change to your WP Rocket settings, check the mobile menu and any dropdowns first. Second, forms, including the confirmation message. Third, sliders, tabs and popups. Fourth, for stores, the cart, coupon field and payment fields. Finally, check that the cookie banner still appears for new visitors, because a delayed banner can create consent problems.
If testing every change to WP Rocket settings sounds like more time than you have, that is worth deciding on purpose.
When Should You Get Help?
You should get help with WP Rocket settings when Core Web Vitals still fail after the safe settings, when the risky features keep breaking parts of the site, or when the site sells online and a broken checkout costs real money. You should also get help if you were running a vulnerable version with the exposed features switched on. The right person for this job will check the version and security first, confirm only one cache plugin is running, and change one setting at a time. They will test menus, forms and checkout as a logged-out visitor on a phone, and leave you with a note of every exclusion they added.
Sites whose WP Rocket settings are tuned this way typically end up both faster and more stable than sites where every option was switched on at once. One example is the slow Elementor site case study, where Largest Contentful Paint went from 4.3 seconds to 1.6 seconds.
Want a second opinion on your setup?
I check the version and security, tune one setting at a time, add the right exclusions and test as a real visitor. Get a free website audit or book a free call.
Frequently Asked Questions
What are the best WP Rocket settings?
With so many options, it is easy to switch on too much. Start with mobile cache, a 10-hour cache lifespan, minified CSS and JavaScript, deferred JavaScript and lazy loading. Then test Delay JavaScript and Remove Unused CSS one at a time. What makes the difference is testing each change as a logged-out visitor.
Is WP Rocket safe to use after the 2026 vulnerability?
The news is worrying, but the fix is simple. Version 3.24.2 closes the flaw, and the two exposed features were off by default. What makes the difference is updating, then checking for unfamiliar PHP files if either feature was on, because updating does not remove anything already planted.
What cache lifespan should I use in WP Rocket?
Longer feels faster, which is why many owners raise it. Keep it at the default 10 hours, because WordPress form tokens last about 12 hours. What makes the difference is keeping the cache shorter than those tokens, so forms on cached pages never fail with an expired token error.
Why did WP Rocket break my site?
It is frustrating when a speed plugin breaks things. Usually Delay JavaScript held a script the page needed straight away, or Remove Unused CSS stripped styles for menus and popups. What makes the difference is undoing the last change, then adding the affected script or style to the right exclusion list.
Should I use Delay JavaScript execution?
It often gives the biggest PageSpeed jump, so it is tempting. Use it, but add exclusions for menus, forms, cookie banners and payment scripts. What makes the difference is testing those elements on a phone in a private window after turning it on, not just checking the score.
Should I enable Remove Unused CSS?
The savings look impressive, especially on page builder sites. It can also strip styles for dropdowns, tabs and popups. What makes the difference is testing it on staging, checking interactive elements on mobile, and using "Load CSS asynchronously" instead if layouts keep breaking.
Can I use WP Rocket and LiteSpeed Cache together?
It seems like two caches should be faster than one. They are not. Two page cache plugins conflict and serve stale or broken pages. What makes the difference is choosing one: LiteSpeed Cache on LiteSpeed servers, WP Rocket on Apache or Nginx hosts, then purging everything and retesting.
Does WP Rocket work with WooCommerce?
Store owners are right to be careful. WP Rocket excludes cart, checkout and account pages from caching automatically. What makes the difference is excluding payment gateway and cart scripts from Delay JavaScript, then placing a full test order on mobile after every change to WP Rocket settings.
Should I combine JavaScript files in WP Rocket?
Combining sounds efficient, and it once was. On modern HTTP/2 and HTTP/3 hosting it brings little benefit and often breaks scripts that must load in order. What makes the difference is leaving it off and relying on minify, defer and delay instead.
Which WP Rocket settings fit my site?
Every site is different, so one checklist rarely fits. Your version, your web server and what the site does decide the setup. What makes the difference is answering those three questions first. The quick checker in this guide gives you a starting setup in under a minute.
Conclusion
The best WP Rocket settings make your site faster without breaking what visitors use. Three points matter most. First, update to 3.24.2 or newer and check for planted files if the exposed features were on. Second, keep cache lifespan at 10 hours and run only one cache plugin. Third, add the riskier WP Rocket settings, Delay JavaScript and Remove Unused CSS, one at a time, testing menus, forms and checkout after each change.
If a fast, stable site is now a real priority, the fastest path forward is working with someone who tests as a real visitor after every change, not switching on every option and hoping.
Get a site that is fast and still works.
I secure and update WP Rocket, tune it one setting at a time, add the right exclusions and confirm Core Web Vitals pass on mobile. Rates start at $20 an hour, quoted up front. See WordPress speed optimization.
This article was last reviewed and updated in December 2026 to reflect WP Rocket 3.24.2 and current caching guidance.
