2026年11月12日
2026年11月12日
LiteSpeed Cache Setup: Caching, Page Optimization, Images and WP-CLI
This article is a localized edition of the Japanese original. Read the Japanese original
LiteSpeed Cache (LSCWP) is a free WordPress plugin from LiteSpeed Technologies. Besides page caching that works together with the server-side cache (LSCache), it bundles CSS and JavaScript optimization, image optimization, integration with object caches and more.
Because there are so many settings, this article first checks which features work in which environment, then goes through caching, page optimization and image optimization in that order, covering only what can be confirmed in the official documentation (docs.litespeedtech.com). The information is current as of October 2026. Setting names are given as they appear when the admin screen is in English. In other admin languages they appear translated, so match them by position and description.
What each feature needs
LiteSpeed Cache's page cache does not work with the plugin alone. The server must provide LSCache.
| Feature | Requirement |
|---|---|
| Page cache (Cache) | LiteSpeed Web Server, OpenLiteSpeed, LiteSpeed Web ADC, or QUIC.cloud CDN |
| ESI (handling parts of a page separately) | LiteSpeed Web Server (Enterprise), LiteSpeed Web ADC, or QUIC.cloud CDN. Not supported on OpenLiteSpeed |
| CSS/JS minify and combine, deferred loading, etc. | Works on any server |
| UCSS, critical CSS, LQIP, Viewport Images | QUIC.cloud services |
| Image optimization | QUIC.cloud services |
| Object cache | Memcached (or LSMCD) or Redis running on the server |
On Apache or Nginx servers the page cache does not work and only the optimization features are available. In that case, use another plugin or the server's own mechanism for page caching, and make sure it doesn't overlap with LiteSpeed Cache.
You can check whether your server runs LiteSpeed on your hosting provider's specification page. After setup, you can also confirm it with the method in "Check that caching works" below.
Install and back up your settings
Install the plugin by searching for "LiteSpeed Cache" under "Plugins" → "Add New" (プラグイン → 新規追加 in the Japanese UI), or with WP-CLI:
wp plugin install litespeed-cache --activate
Exporting your settings to a file before and after changes gives you something to restore from.
# Export current settings to a file
wp litespeed-option export --filename=/tmp/lscwp-options.txt
# Import settings from the exported file
wp litespeed-option import /tmp/lscwp-options.txt
# Read or change a single setting (example: caching for logged-in users)
wp litespeed-option get cache-priv
wp litespeed-option set cache-priv false
The admin screen also has a "Presets" menu for applying predefined combinations of settings in one go (with WP-CLI, for example wp litespeed-presets apply basic). The settings before the preset was applied are kept as a backup: list them with wp litespeed-presets get_backups and restore with wp litespeed-presets restore <number>.
Page cache settings (Cache)
The basic caching options are on the "Cache" tab under "LiteSpeed Cache" → "Cache". The main settings and their defaults are:
| Setting | Default | What it does |
|---|---|---|
| Enable Cache | ON | Turning it off stops caching and also purges existing cache |
| Cache Logged-in Users | ON | Stores logged-in users' pages in a cache private to each user |
| Cache Commenters | ON | Whether commenters see the cached page |
| Cache REST API | ON | Caches REST API responses |
| Cache Login Page | OFF | Caches the login page |
| Cache Mobile | OFF | Keeps separate caches for mobile and desktop |
Cache Mobile is mainly for themes that build a separate smartphone-only layout (non-responsive themes). With a responsive theme you can usually leave it off. Turning it on increases the number of cache variants and the crawler load.
URLs you don't want cached go in Do Not Cache URIs on the "Excludes" tab, one per line (partial match; ^ anchors to the start and $ requires an exact match).
Purge the cache on updates
Purge All On Upgrade on the "Purge" tab is off by default, but the official documentation recommends turning it on. It prevents old HTML from staying in the cache when plugins, themes or WordPress core are updated.
To purge the cache manually, use the LiteSpeed icon in the admin bar or WP-CLI's litespeed-purge:
# Purge all cache
wp litespeed-purge all
# Purge the cache for a specific URL
wp litespeed-purge url https://example.com/sample-page/
# Purge by post ID
wp litespeed-purge post_id 12 34
Check that caching works
While logged out (or in a private browser window), open a page twice and check whether the response headers include x-litespeed-cache: hit.
curl -sI https://example.com/ | grep -i "x-litespeed-cache"
# miss on the first request and hit afterwards means the server-side cache is working
Behind LiteSpeed Web ADC you may see X-LSADC-Cache instead, and behind QUIC.cloud CDN X-QC-Cache. If none of these headers appear at all, either the server is not LiteSpeed-based or there is a problem with the LSCache configuration. A logged-in browser may bypass the cache, so check while logged out.
Page optimization (Page Optimization)
"Page Optimization" holds the settings for loading CSS, JS, HTML and images. This is where layout breakage and malfunctions happen most easily, and the official documentation itself warns you to test thoroughly before enabling these options on a production site. Change one setting at a time and check the main pages (home page, posts, forms, cart and so on) before moving on.
| Tab | Main settings |
|---|---|
| CSS Settings | CSS Minify, CSS Combine, Generate UCSS, Load CSS Asynchronously |
| JS Settings | JS Minify, JS Combine, Load JS Deferred (Off / Deferred / Delayed) |
| HTML Settings | HTML Minify, DNS Prefetch, Remove WordPress Emoji, etc. |
| Media Settings | Lazy Load Images, Lazy Load iframes, Add Missing Sizes, etc. |
| Tuning / Tuning CSS | JS, CSS and URIs to exclude from optimization |
An example order:
- Turn on
CSS MinifyandJS Minifyand check the display. - If needed, try
CSS CombineandJS Combine. If combining causes problems, the official documentation suggests turning onCSS Combine External and InlineandJS Combine External and Inlineto preserve load order. - For
Load JS Deferred, start withDeferred.Delayeddoesn't run JS until the visitor interacts, so sliders, forms and the like may stop working. - Exclude files that caused problems from optimization with
JS Excludesand similar settings under "Tuning".
Generate UCSS (extracting only the CSS in use), Load CSS Asynchronously (generating critical CSS and loading CSS asynchronously) and Viewport Images are generated by QUIC.cloud services. Without QUIC.cloud, they don't work.
Lazy loading for images is Lazy Load Images under "Media Settings". If the large above-the-fold image (the LCP element) is lazy-loaded, the page looks slower, so exclude that image with Lazy Load Image Excludes under "Media Excludes".
Image optimization (Image Optimization)
Image optimization sends images to QUIC.cloud's servers and receives compressed images back. First, connect the site to QUIC.cloud by clicking Enable QUIC.cloud services under "General" → "Online Services". If your server has a firewall, you need to allow QUIC.cloud's IP addresses.
- On the "Image Optimization" settings tab, check settings such as
Optimize Original Images(on by default; originals are backed up with a.bksuffix). - Click "Send Optimization Request". The first request sends just one image as a test; later requests send up to 200 images at a time.
- Finished images are pulled in by cron or with "Pull Images".
WebP and AVIF images are not created unless you enable that in the settings. Follow the descriptions on the screen to enable generating and serving next-generation formats, and check that WebP or AVIF labels appear in the Media Library.
You can do the same with WP-CLI:
wp litespeed-image push # request optimization
wp litespeed-image pull # pull optimized images
wp litespeed-image status # show progress
Turning on Remove Original Backups deletes the backups of the original images, and you can no longer revert. Decide only after checking the optimization results.
QUIC.cloud image optimization has a standard queue you can use for free and a priority queue that becomes paid once you exceed its monthly free quota (per the official documentation as of October 2026). Pricing and free quotas may change, so check the official QUIC.cloud website before you rely on them.
ESI (handling parts of a page separately)
ESI (Edge Side Includes) splits a page into fragments and lets each fragment be shared-cached, cached privately per user, or not cached at all. This allows cached pages to be served to logged-in users too.
- Enable it with
Enable ESIon the "Cache" → "ESI" tab. - Once enabled, the admin bar, the comment form and so on are handled as ESI fragments (
Cache Admin Bar,Cache Comment Form). - It works on LiteSpeed Web Server (Enterprise), LiteSpeed Web ADC and QUIC.cloud CDN. It is not available on OpenLiteSpeed.
It is worth considering for sites with a lot of content for logged-in users or members, when you want caching to be more effective. After enabling it, use several accounts to check that logged-in content (user names, cart contents and so on) is not mixed up between users.
Object cache (Object)
On the "Cache" → "Object" tab you can use Memcached (including LSMCD) or Redis as an object cache. The plugin itself does not provide an object cache, so these must be running on the server. Check your hosting provider's specifications to see whether they are available.
QUIC.cloud CDN
With QUIC.cloud CDN, page caching can work at the CDN even on servers that are not LiteSpeed. After connecting to QUIC.cloud under "General" → "Online Services", set up your domain following the instructions on the "CDN" screen. You can also check the status with WP-CLI:
wp litespeed-online cdn_status
This involves switching DNS, so prepare as you would for any DNS change: lower the TTL in advance, schedule a time for the work, and so on.
How to roll back when something breaks
- Layout broke: turn off the setting you just enabled under "Page Optimization", purge the cache with
wp litespeed-purge all, then check again. - Logged-in content looks wrong: review
Cache Logged-in Usersand the ESI settings. - You want all settings back: import the file you exported with
wp litespeed-option import, or restore a backup withwp litespeed-presets restore.
Summary
- The page cache requires a LiteSpeed-based server or QUIC.cloud CDN. On Apache or Nginx, only the optimization features are available.
- WP-CLI commands include
wp litespeed-purge,wp litespeed-optionandwp litespeed-image. There is no command calledwp litespeed-cache. Cache Mobileis for non-responsive themes. Turning onPurge All On Upgradeis recommended.- Try CSS/JS optimization one setting at a time, and exclude problem files under Tuning.
- Image optimization, UCSS and critical CSS are QUIC.cloud services; check pricing and free quotas on the official site.
Related articles:
- How to choose a WordPress cache plugin
Questions about WordPress? The publisher of this site is based in Japan and replies in Japanese. Contact (Japanese)