To set up LiteSpeed Cache, install the plugin on a host running a LiteSpeed web server, confirm the page cache responds, apply the “Advanced (Recommended)” preset or enable settings one at a time, and test your site after each step. Page caching delivers most of the gain; CSS, JavaScript and image optimisations come next, carefully.
Written for LiteSpeed Cache 7.9, the version installed on our test servers on 8 October 2026. Setting names match the plugin’s English interface.
Key takeaways
- LiteSpeed Cache’s page cache only works on a LiteSpeed server (or behind the QUIC.cloud CDN); its other optimisations work anywhere.
- Start with Presets > Advanced (Recommended): it turns on caching, browser cache, minification and deferred JS, and backs up your current settings first.
- Deactivate any other caching plugin (WP Rocket, W3 Total Cache, WP Super Cache…) before enabling LSCache.
- Turn optimisations on one at a time and purge the cache between tests; aggressive options (CSS/JS combine, delayed JS) sometimes break layouts.
- Check the result with the
x-litespeed-cache: hitheader and PageSpeed Insights.
What is LiteSpeed Cache and what does it do?
LiteSpeed Cache (LSCache) is a free WordPress plugin that controls the cache built into the LiteSpeed web server. Pages generated by WordPress are stored by the server and served again without running PHP or querying the database. The plugin adds optimisation tools on top: CSS/JS minification, lazy loading, WebP images and database cleanup.
The difference from classic caching plugins is where the cache lives. A plugin such as WP Super Cache writes HTML files that the server then has to find; with LiteSpeed, the server itself manages the cache, can purge it precisely (one page, one category, one tag) and can tell an anonymous visitor from a logged-in customer. The plugin is listed in the official WordPress plugin directory and documented by LiteSpeed Technologies.
Some features rely on QUIC.cloud, the vendor’s online service: critical CSS and unused-CSS removal (UCSS), image optimisation, LQIP placeholders and viewport images (VPI). It is optional: the plugin itself states that many features work without it. Online services run on quotas, and some options, such as AVIF, are paid.
What do you need before configuring LiteSpeed Cache?
You need hosting on a LiteSpeed server (LiteSpeed Enterprise or OpenLiteSpeed; every Hosterwise plan runs LiteSpeed Enterprise), a recent backup and no other caching plugin active. Ideally, configure on a staging copy first, then replicate the settings on the live site.
To check whether your server runs LiteSpeed, look at the server header your site returns:
curl -sI https://www.example.com/ | grep -i -E "^server|x-litespeed-cache"
# Expected on a LiteSpeed server:
# server: LiteSpeed
# x-litespeed-cache: hit (after the page has been visited once)Before installing the plugin:
- Take a full backup (files and database).
- Deactivate and delete other caching and minification plugins: two stacked page caches cause stale pages and errors that are hard to trace.
- Update WordPress, your theme and plugins, and check your PHP version: WordPress recommends PHP 8.3 or later.
- Record your baseline scores in PageSpeed Insights so you can measure each change.
Then install LiteSpeed Cache from Plugins > Add New and activate it. A LiteSpeed Cache menu appears in the admin.
Should you use a preset or configure everything by hand?
Start with a preset: Advanced (Recommended) suits most sites and automatically backs up your current settings, restorable in one click. Fine-tune by hand afterwards. The Aggressive and Extreme presets require thorough testing and exclusions.
Presets live under LiteSpeed Cache > Presets > Standard Presets. Here is what each one enables, according to the plugin itself:
| Preset | What it adds | QUIC.cloud required | Risk |
|---|---|---|---|
| Essentials | Default cache, higher TTL, browser cache | No | None |
| Basic | + image optimisation, mobile cache | Yes | Low |
| Advanced (Recommended) | + Guest Mode and Guest Optimization, CSS/JS/HTML minification, font display optimisation, deferred JS, DNS prefetch, Gravatar cache, emoji and query-string removal | Yes | Low to moderate |
| Aggressive | + CSS/JS combine, async CSS with critical CSS, unused CSS removal (UCSS), lazy-loaded iframes | Yes | Testing essential |
| Extreme | + lazy-loaded images, viewport images (VPI), delayed JS, inline CSS and JS added to combine | Yes | Exclusions almost certain |
If your host gives you SSH access, WP-CLI can apply a preset and purge the cache:
wp litespeed-presets apply advanced # apply the Advanced preset
wp litespeed-presets get_backups # list settings backups
wp litespeed-purge all # purge the whole cacheHosterwise does not offer SSH access: it is a deliberate security choice that keeps the server’s attack surface small. You can do the same from the admin (Presets and Toolbox > Purge), and our 24/7 support can run a WP-CLI command for you if needed.
Step 1: which cache settings should you enable?
Under LiteSpeed Cache > Cache, enable caching plus caching for commenters, the REST API and the login page. Keep the default TTLs. Turn on “Purge All On Upgrade” so you never serve pages built with an outdated plugin version.
Cache tab
- Enable Cache: ON. This is the setting that does most of the work.
- Cache Logged-in Users: ON if visitors log in (WooCommerce customers, members). Each user then gets a private cache.
- Cache Commenters: ON.
- Cache REST API: ON, useful for themes and blocks that call the API.
- Cache Login Page: ON, unless a security plugin customises that page on every visit.
- Cache Mobile: OFF with a standard responsive theme. Turn it on if your theme serves different HTML on mobile, or if you use Guest Optimization, UCSS or viewport images, which the plugin generates per device type.
TTL tab
Default lifetimes suit almost every site, because the plugin automatically purges affected pages when you publish or edit content.
| Setting | Default | Recommendation |
|---|---|---|
| Default Public Cache TTL | 604,800 s (7 days) | Keep |
| Default Private Cache TTL | 1,800 s (30 min) | Keep |
| Default Front Page TTL | 604,800 s (7 days) | Lower only if the home page shows fast-changing external data |
| Browser Cache TTL | 31,557,600 s (1 year) | Keep |
Purge and Excludes tabs
- Purge All On Upgrade: ON.
- Serve Stale: OFF for a store (prices and stock must be current); worth considering for a busy blog.
- Do Not Cache URIs: add pages that are genuinely dynamic on your site. Not needed for WooCommerce: the plugin already excludes cart, checkout and account pages.
ESI tab
ESI (Edge Side Includes) lets you cache a page while keeping one fragment dynamic, such as the admin bar or a form. Enable ESI is OFF by default; turn it on only if you cache logged-in users and notice personalised blocks getting stuck. OpenLiteSpeed does not support ESI; LiteSpeed Enterprise, which runs every Hosterwise plan, does.
Step 2: how do you set up browser and object caching?
Enable the browser cache (Browser tab): LiteSpeed Cache then writes one-year expiry rules for images, CSS and JS. Enable the object cache (Redis or Memcached) only if your host provides one of these services (at Hosterwise, Redis is available on every plan); the connection test shown in the tab will confirm it.
Once browser caching is on, the plugin adds a block like this to your .htaccess file (excerpt):
### marker BROWSER CACHE start ###
<IfModule mod_expires.c>
ExpiresActive on
ExpiresByType image/webp A31557600
ExpiresByType image/avif A31557600
ExpiresByType text/css A31557600
ExpiresByType application/javascript A31557600
</IfModule>
### marker BROWSER CACHE end ###Do not edit this block by hand: the plugin rewrites it every time you save. To view it, use Toolbox > View .htaccess.
For the object cache (Object tab), pick the Method (Memcached or Redis), enter the Host and Port your host gives you, then save. At Hosterwise, turn on object caching under LiteSpeed Cache > Cache > Object, pick Redis and use the host and port shown in your customer area or given by support; once saved, “Connection Test” should report a successful connection. If it reports a failure, leave object caching off: a misconfigured object cache slows a site down instead of speeding it up. It mainly helps dynamic sites (WooCommerce, memberships, busy admin areas).
Step 3: how do you optimise CSS, JavaScript and HTML?
In Page Optimization, enable CSS, JS and HTML minification and deferred JavaScript, then test. Leave file combining off: with HTTP/2 and HTTP/3 it brings little and often breaks layouts. Critical CSS and UCSS go through QUIC.cloud and need testing.
CSS Settings
- CSS Minify: ON.
- CSS Combine: OFF to start with.
- Generate UCSS: test it. QUIC.cloud computes the CSS each page actually uses; a noticeable gain on heavy themes, but check menus, sliders and modals.
- Load CSS Asynchronously: test together with critical CSS. If you see a flash of unstyled content, turn it off.
- Font Display Optimization:
Swap, so text shows while fonts load.
JS Settings
- JS Minify: ON.
- JS Combine: OFF.
- Load JS Deferred: choose Deferred. Delayed waits for user interaction before loading scripts: great for scores, but only for thoroughly tested sites.
- If a script breaks (mobile menu, slider, cookie banner), add its file name under Tuning > JS Deferred / Delayed Excludes, for example
jquery.min.js.
HTML Settings
- HTML Minify: ON.
- DNS Prefetch Control: ON.
- Remove Query Strings: ON.
- Remove WordPress Emoji: ON.
- Load Google Fonts Asynchronously: ON if you load fonts from Google; better still, self-host your fonts.
The same settings with WP-CLI, if you have SSH access (adapt to your needs):
wp litespeed-option set optm-css_min true
wp litespeed-option set optm-css_font_display 1 # 1 = Swap
wp litespeed-option set optm-js_min true
wp litespeed-option set optm-js_defer 1 # 0 = OFF, 1 = Deferred, 2 = Delayed
wp litespeed-option set optm-html_min true
wp litespeed-option set optm-qs_rm true
wp litespeed-option set optm-emoji_rm true
wp litespeed-purge allStep 4: how do you optimise images with LiteSpeed Cache?
Turn on image lazy loading and Add Missing Sizes, but exclude the main above-the-fold image, which is often the LCP element. For compression and WebP, the Image Optimization menu sends your images to QUIC.cloud and then swaps the served files automatically.
Under Page Optimization > Media Settings:
- Lazy Load Images: ON, but never lazy-load the LCP image. Add your logo and hero image to Lazy Load Image Excludes, or enable Viewport Images (VPI), which detects images visible on load automatically.
- Add Missing Sizes: ON. Images without width and height cause layout shifts (CLS).
- Lazy Load Iframes: ON if you embed YouTube videos or maps.
Under Image Optimization > Image Optimization Settings:
- Auto Request Cron: ON, so new images are processed as they arrive.
- Optimize Original Images: ON.
- Remove Original Backups: OFF until you are happy with the results.
- Next-Gen Image Format:
WebP. AVIF is a paid QUIC.cloud feature.
Step 5: database, Heartbeat and crawler
Clean the database after taking a backup, cap the number of stored revisions, slow down the WordPress Heartbeat and keep the crawler off on shared hosting unless your host says otherwise. These settings lighten the server load more than they speed up rendering.
- Database > Manage: “Clean All” runs every cleanup listed on the page at once (revisions, auto drafts, trashed posts and comments, spam, expired transients…). Back up first.
- Revisions Max Number (Database > DB Optimization Settings): for example 10, applied when cleaning. You can also cap revisions in
wp-config.php:
// wp-config.php: above the "That's all, stop editing!" line
define( 'WP_POST_REVISIONS', 10 );- Toolbox > Heartbeat: enable frontend and backend control; an interval of 60 to 120 seconds cuts
admin-ajax.phprequests without getting in the editor’s way. - Crawler: it visits your pages to warm the cache. Useful on a dedicated server; on shared hosting it eats shared resources, and many hosts disable it server-side.
How can you check that LiteSpeed Cache is working?
Open a page in a private window and inspect its headers: x-litespeed-cache: hit means the page came from cache, miss means it was just generated, and hit,private means it came from a logged-in user’s private cache. The page source also ends with a “Page cached by LiteSpeed Cache” comment.
# First request: miss (the page is generated, then stored)
curl -sI https://www.example.com/ | grep -i x-litespeed-cache
# Second request: hit (the page is served from cache)
curl -sI https://www.example.com/ | grep -i x-litespeed-cacheThen measure server response time (TTFB) on a cached page; Google considers a TTFB of 0.8 seconds or less to be good. Finally, compare your PageSpeed Insights scores with your baseline, bearing in mind that field data (Chrome UX Report) takes several weeks to reflect a change.
What if an optimisation breaks your site?
Turn off the last optimisation you enabled, purge the cache and test again: it is almost always the culprit. If the site is still broken, use “Disable All Features” in Debug Settings or restore the backup created by the preset. Exclusions in the Tuning tab fix most conflicts.
- Identify the symptom: broken layout (CSS), dead menu or button (JS), missing image (lazy load), another user’s page showing (private cache or ESI).
- Turn off the matching setting, then Toolbox > Purge > Purge All.
- Add a targeted exclusion instead of disabling everything: a stylesheet under “CSS Excludes”, a script under “JS Excludes” or “JS Deferred / Delayed Excludes”, an image under “Lazy Load Image Excludes”.
- As a last resort, Toolbox > Debug Settings > Disable All Features, or, with SSH access, from the command line:
wp litespeed-option set debug-disable_all true. At Hosterwise, if the admin is unreachable, our 24/7 support runs this command for you. - Check the official troubleshooting page, which covers the most common conflicts.
Recommended settings at a glance
| Menu | Setting | Suggested value |
|---|---|---|
| Cache | Enable Cache | ON |
| Cache | Cache Logged-in Users | ON if customers or members log in |
| Cache | Cache Mobile | Depends on theme and optimisations used |
| Cache > Purge | Purge All On Upgrade | ON |
| Cache > Browser | Browser Cache | ON (1-year TTL) |
| Cache > Object | Object Cache | ON if Redis or Memcached is provided (Redis on every Hosterwise plan) |
| Page Optimization > CSS | CSS Minify / CSS Combine | ON / OFF |
| Page Optimization > CSS | Font Display Optimization | Swap |
| Page Optimization > JS | JS Minify / JS Combine | ON / OFF |
| Page Optimization > JS | Load JS Deferred | Deferred |
| Page Optimization > HTML | HTML Minify, remove emoji and query strings | ON |
| Page Optimization > Media | Lazy Load Images | ON, LCP image excluded |
| Page Optimization > Media | Add Missing Sizes | ON |
| Image Optimization | Next-Gen Image Format | WebP |
| Crawler | Crawler | OFF on shared hosting |
LiteSpeed Cache at Hosterwise
Every Hosterwise plan runs on LiteSpeed Enterprise servers with HTTP/3, so LiteSpeed Cache’s page cache works as soon as you activate the plugin, with nothing to configure server-side; ESI and a Redis object cache are available too (see step 2). If you are moving from an Apache or Nginx host, remember to remove your old caching plugin before enabling LSCache; if you hand us your free migration, just tell us which caching plugins are installed.
To compare plans and resources, see our LiteSpeed WordPress hosting page or go straight to pricing. Still weighing up hosts? Our honest WordPress hosting comparison lists what to check. Once caching is in place, carry on with our 15 practical ways to speed up WordPress.
LiteSpeed Cache FAQ
Does LiteSpeed Cache work without a LiteSpeed server?
Not the page cache: it requires LiteSpeed Enterprise, OpenLiteSpeed or the QUIC.cloud CDN in front of your site. Other features (minification, image optimisation, database cleanup, lazy loading) work on Apache or Nginx, but you lose the plugin’s main advantage.
Which LiteSpeed Cache preset should I choose?
“Advanced (Recommended)” suits most sites and backs up your settings before applying. Pick “Essentials” if you do not want to connect QUIC.cloud. “Aggressive” and “Extreme” need testing and exclusions, especially for sliders, menus and logos.
Do I need to connect QUIC.cloud?
No. QUIC.cloud is required for image optimisation, critical CSS, UCSS, LQIP placeholders and viewport images. These services run on quotas, and some features, such as AVIF, are paid.
Is LiteSpeed Cache compatible with WooCommerce?
Yes. The plugin automatically excludes the cart, checkout, account pages and add-to-cart URLs from cache. Enable Cache Logged-in Users for signed-in customers and, if a personalised fragment gets stuck, ESI.
Can I use LiteSpeed Cache together with WP Rocket?
It is not recommended: two page caches contradict each other and serve stale pages. Pick one. On a LiteSpeed server, LiteSpeed Cache is the logical choice because the server itself handles the cache.
How do I clear the LiteSpeed cache?
From the admin bar, LiteSpeed Cache menu > Purge All, or under Toolbox > Purge. With SSH access, from the command line: wp litespeed-purge all. Edited pages are purged automatically whenever you publish anyway.


