Plugin how-tos · Guide
LiteSpeed Cache Settings Explained
Short answer
LiteSpeed Cache settings control which pages are stored as ready copies, how long each copy lives, and when it is cleared. The Cache tab holds the master switch, the TTL tab sets lifetimes with most pages cached for 604800 seconds, or 1 week, by default, and the Purge tab clears stale copies when you publish or update content. Other sections cover private content, object and browser caching, and file optimization, and most sites can leave the defaults alone.
Key takeaways
- Enable Cache is the master switch: ON caches your pages, and OFF stops caching and purges all cached pages.
- Most pages stay cached for 604800 seconds, or 1 week, by default, while private pages use 1800 seconds.
- TTL values under 30 seconds mean the page should not be cached at all.
- Serve Stale sends visitors the last cached copy while a fresh one builds, which helps busy sites most.
- CSS and JS Minify and Combine are all OFF by default, and LiteSpeed docs say to test them before using them live.
- ESI punches private holes, such as a cart widget, into public cached pages and is disabled by default.
What is LiteSpeed Cache and what do its settings control?
LiteSpeed Cache is a free WordPress plugin that controls the page cache built into LiteSpeed web servers, plus tools that shrink files, clean the database and serve images.
The page cache needs a LiteSpeed web server or the QUIC.cloud CDN to run. LiteSpeed docs warn that you will see a message saying the caching functions are unavailable if neither is in place. The file and image tools can still run on other hosts.
You will find the plugin menu under “LiteSpeed Cache” in your WordPress admin. Its sections are Dashboard, General, Cache, CDN, Image Optimization, Page Optimization, Database, Crawler and Toolbox. Each section holds its own tabs.
Everything is disabled when you first activate the plugin. LiteSpeed docs say the default settings are chosen to work for most sites right out of the box, so you can switch on the page cache and leave the rest alone. If you want to compare caching approaches first, see WP Rocket vs host caching.
What does the General section do?
General controls QUIC.cloud services, automatic plugin updates and Guest Mode, not the page cache itself.
“Automatically Upgrade” is OFF by default. When you switch it on, your site gets plugin updates within a few hours of a new version going live in the WordPress Plugin Directory. LiteSpeed docs note that it only works if WP-Cron is enabled, and WP-Cron is enabled in WordPress by default.
“Domain Key” was deprecated in version 7 of the plugin. To connect to QUIC.cloud now, go to “LiteSpeed Cache > General > Online Services” and press the “Enable QUIC.cloud Services” button. The General settings docs list the current connection steps.
“Guest Mode” is OFF by default. When it is on, LiteSpeed Cache serves a default version of the page from cache for a visitor's first request. The separate Guest Optimization tab was deprecated as of version 7.7.
What does Enable Cache and the Cache tab do?
The Cache tab holds the master switch and decides which kinds of pages get cached.
“Enable Cache” is the final step to switch caching on. When it is ON, your site's pages are cached. When you switch it OFF, caching stops and all existing cached pages are purged.
The Cache settings docs describe each option on this tab. On a multisite network, subsite admins also get a “Use Network Admin Setting” choice.
“Cache Logged-in Users” is ON by default. Pages for logged-in users are stored in private cache by IP address and session ID, so one user does not get another user's private page.
“Cache REST API” is ON by default, and it allows requests made through WordPress REST API calls to be cached. “Cache Login Page” is OFF by default as of version 7.9, so the login page is built fresh each time.
“Cache Mobile” is OFF by default. It keeps separate cached copies for mobile and desktop views.
LiteSpeed docs say it is mainly for non-responsive themes with a mobile-specific design, or for sites with mobile-only content. The mobile user agents list must not be empty when it is ON.
“Drop Query String” lets you list query strings the cache should ignore. Some query strings, such as those used for marketing or analytics, do not change the page content, so there is no need to store a separate cached copy for each one.
What do the TTL settings mean?
TTL means Time to Live: the number of seconds a page stays in cache before it counts as stale and is purged.
| Setting | Default | What it covers |
|---|---|---|
| Default Public Cache TTL | 604800 (1 week) | Most pages |
| Default Private Cache TTL | 1800 (30 minutes) | Private pages; allowed range is 60 to 3600 |
| Default Front Page TTL | 604800 (1 week) | Front page; WooCommerce uses it for the Shop page |
| Default Feed TTL | 604800 (1 week) | Feeds |
| Default REST TTL | 604800 (1 week) | REST API calls |
| HTTP Status Code Page TTL | 3600 each for 403, 404 and 500 | Error pages |
Values of 30 seconds or more set a TTL. LiteSpeed docs say smaller values mean the page should not be cached at all.
A long TTL suits pages that rarely change after they are posted. Feeds stay fresh because cached feed pages are purged when a post is updated or a comment is added.
For 500 errors, LiteSpeed docs warn that caching the page may mask a problem inside WordPress, so you may not want to cache those at all.
What do the Purge settings do?
Purge settings decide when cached pages are cleared before their TTL ends.
“Purge All on Upgrade” clears all pages when WordPress core, a theme or a plugin is updated. LiteSpeed docs recommend leaving this option ON, because you never know what may change between versions.
“Auto Purge Rules For Publish/Update” picks which related pages are purged when you publish or update a post. A new post can change the home page, a category archive, a tag archive and an author archive, so those pages need fresh copies.
The “All pages” option is disabled by default, and LiteSpeed docs say it is best not to select it in most cases.
“Serve Stale” is OFF by default. When it is ON, visitors get the most recently purged cached copy of a page while a fresh copy is still being built.
LiteSpeed docs give an example: if 100 users visit a purged page before the first rebuild finishes, all 100 get the stale copy instead of triggering 100 PHP builds. It helps busy sites most.
“Scheduled Purge URLs” holds full URLs, one per line, to purge at a set time each day, with wildcards supported. Use it for content that comes from an outside source. “Scheduled Purge Time” sets when that purge runs.
“Purge All Hooks” lists the WordPress hooks that trigger a full purge. You can edit the list: for example, remove the “create_term” hook to stop purging the whole cache whenever you create a tag or category.
What are Excludes and ESI for?
Excludes and ESI let you keep chosen pages out of the public cache, or punch private holes in public pages.
The Excludes tab holds pages you do not want cached at all. “Private Cached URIs” lists path patterns that must never be cached publicly.
You can mark the start of a URI with “^” and an exact match with “$”. LiteSpeed docs give the example that “/recipes/baking/$” matches only that exact page.
“Force Cache URIs” lists paths that will be cached no matter what other non-cacheable settings say. You can add a space and a TTL after a URI, such as “/mypath/mypage 300”, to give that page a 300-second TTL. “Force Public Cache URIs” does the same thing for the public cache.
ESI stands for Edge Side Includes. It punches holes in public content and fills them with private or uncached content, such as a shopping cart widget or a personal greeting.
ESI is disabled by default. To switch it on, go to “LiteSpeed Cache > Cache > ESI” and set “Enable ESI” to ON.
What do Object Cache and Browser Cache do?
Object Cache stores database results in memory, and Browser Cache tells a visitor's browser to keep static files on their own device.
The Object tab controls an external object cache, either Memcached or Redis, which is enabled and configured by the server admin. LiteSpeed docs describe it as an advanced tab for that reason.
Only switch it on if your host provides Redis or Memcached. Host guidance from Ecenica lists the default object lifetime as 360 seconds.
Browser cache is a client-level cache for static files. With it enabled, files such as images are stored on the user's device the first time they are requested.
Later visits pull those files from local storage until the browser cache expires. Ecenica's host guide lists the default Browser Cache TTL as 31557600 seconds, which is 1 year.
The Advanced tab is aimed at experienced users. LiteSpeed docs say you are not likely to need it unless you have a conflict with another cache plugin. A WooCommerce tab appears only when WooCommerce is active, and it holds settings for caching shop content.
What do the Page Optimization settings do?
Page Optimization changes how CSS, JavaScript and HTML files are delivered. It does not change the page cache.
“CSS Minify” is OFF by default. When it is on, extra white space, newline characters and comments are stripped from CSS files.
“CSS Combine” is also OFF, and it merges all CSS files into a single file. The JS tab has the same pair: “JS Minify” strips extra characters from JavaScript, and “JS Combine” merges JS files into one.
“Generate UCSS” is OFF by default. Unique CSS is a QUIC.cloud service that works with CSS Combine to create one streamlined CSS file for each page of your site.
“HTML Minify” is OFF by default and strips extra white space, newline characters and comments from HTML. “Load JS Deferred” moves scripts so they run after the page HTML has loaded, instead of blocking it.
LiteSpeed docs warn you to test these options thoroughly before enabling them on a production site, and to run Purge All after changing them. If your site uses a page builder, read Elementor performance settings explained before you switch on combine options, since merged files can change load order.
What do the CDN, Image Optimization, Database, Crawler and Toolbox sections do?
The remaining sections cover the content delivery network, images, the database, the crawler and manual tools.
- CDN: configure a content delivery network for WordPress. CDN support is disabled by default, so skip this section if you do not use a CDN. If you are weighing the cost, see how much a CDN costs for WordPress.
- Image Optimization: shrink images through a QUIC.cloud service. It is disabled by default.
- Database: run database cleanup tasks through the plugin's DB Optimizer.
- Crawler: disabled by default. When it is active, it travels your site and refreshes pages that have expired from cache. Crawling can use a lot of server resources, and not all hosts allow it.
- Toolbox: manually purge the cache, export or import your settings, and debug a problem. The Environment Report here gives you a report number to share with LiteSpeed support.
The Dashboard shows the status of your LiteSpeed Cache and QUIC.cloud services at a glance, including image optimization, critical CSS generation, low-quality image placeholders and the crawler. Your server itself also matters: check WordPress hosting requirements if the plugin reports that caching is unavailable.
How do you change a setting safely?
Change one setting at a time, save it, purge the cache and test it before you touch the next one.
- Note the current value first, or export your settings in “LiteSpeed Cache > Toolbox > Import/Export” so you can restore them.
- Change one setting and click “Save Changes”.
- Purge the cache from “LiteSpeed Cache > Toolbox > Purge”, or use “Purge All” from the LiteSpeed icon in the admin bar.
- Open the page in a private browser window and click through the menu, forms and, on a shop, the cart and checkout.
- If the page looks wrong, switch the setting back, save, purge again and retest.
Allow a few minutes per change. A single setting is quick to change, but a careful check of menus, forms and mobile layout takes longer than the click itself.
What mistakes should you avoid?
Switching on CSS Combine and JS Combine at the same time makes a fault hard to trace.
If the layout breaks, you will not know which one caused it. Switch them on one at a time and test after each change.
Do not enable Cache Mobile on a responsive theme. It creates extra cached copies of every page for no gain. Leave it for sites with a separate mobile design or mobile-only content.
Do not force account, cart or checkout pages into the public cache. Private pages belong in private cache, or out of the cache entirely, so one visitor never sees another visitor's details.
Do not run two page caches at once. LiteSpeed docs warn that if you use Cloudflare, you must not enable its Automatic Platform Optimization, because it is also a page cache. See how to set Cloudflare cache rules for WordPress to keep the two systems from fighting.
Do not purge the whole cache after every small edit. The auto-purge rules already clear the edited page and its related archives, and a full purge forces every page to rebuild. Finally, do not switch on the crawler without asking your host first, since some hosts do not allow it.
Frequently asked questions
Do LiteSpeed Cache settings work without a LiteSpeed server?
No, not the page cache. The page cache needs a LiteSpeed web server or the QUIC.cloud CDN, and the plugin shows a warning when neither is in place. The file tools, such as CSS and JS minification, can still run on other hosts. If your host does not run LiteSpeed, ask them about QUIC.cloud or a server-level cache they do support.
What TTL should I use for a blog that posts every day?
The defaults work well because the auto-purge rules clear a page and its related archives as soon as you publish or update a post. The TTL only sets the maximum age of a copy, so a 1-week public TTL does not keep old posts on your site. Shorten the front page TTL only if your home page shows content that changes without a post being published.
Why does my site still feel slow after I turn caching on?
First check the Dashboard for the warning that caching functions are unavailable, which means the server or QUIC.cloud is not set up. Then purge the cache and test in a private window, since your own browser may show an old copy. Also check that no second page cache, such as Cloudflare APO, is running at the same time.
Should I enable Cache Logged-in Users?
It is ON by default, and logged-in pages are stored in private cache tied to each visitor's IP address and session ID. That keeps one user's private page away from other visitors. On a shop or membership site, keep account, cart and checkout pages out of the public cache, and test them while logged in after any change.
What does Purge All actually do?
It clears every cached page on your site, so each page must be rebuilt on its next visit. Use it after changing settings or when a page shows old content that auto-purge missed. You should not need it often, since publishing or updating a post already purges that page and its related archives.
Can I use LiteSpeed Cache with Cloudflare?
Yes, but do not enable Cloudflare Automatic Platform Optimization, because it is also a page cache and two page caches will fight. LiteSpeed docs warn against running both. You can still use Cloudflare for DNS, security and its CDN features while LiteSpeed Cache handles the page cache.
Sources
- Cache | Screen-by-Screen | LSCache for WordPress LiteSpeed Documentation
- Beginner's Guide | LSCache for WordPress LiteSpeed Documentation
- General | Screen-by-Screen | LSCache for WordPress LiteSpeed Documentation
- Page Optimization | Screen-by-Screen | LSCache for WordPress LiteSpeed Documentation
- LiteSpeed Cache WordPress.org
- Best LiteSpeed Cache Settings for WordPress Ecenica
- Configuring LiteSpeed Cache Krystal Hosting
Is your product missing, or something out of date?
Tell us what to add or correct. We read every note and reply when we need a source. A message does not buy a ranking.
Thanks — we review requests within 3 business days.
