Panellicense

Enable LSCache for WordPress on a cPanel server

Turn on LSCache for every WordPress account on a cPanel server in one WHM action, then verify cache hits and fix the three configurations that catch most operators out.

7 min readUpdated 2026-05-15litespeed · lscache · wordpress · cpanel
schema: HowToschema: FAQPageschema: BreadcrumbList

LSCache is the reason most hosts switch from Apache to LiteSpeed. It's a server-level page cache that sits inside the LiteSpeed binary — not a PHP plugin emitting headers, not Varnish in front. On a typical WordPress site, that's the difference between 80-150 ms TTFB and 8-20 ms TTFB, and roughly a 10× drop in PHP-FPM workers needed at peak.

This guide covers the WHM-side mass deployment (so you don't install the plugin on 200 accounts one at a time), the per-site activation step that owners still need to do, and the three configurations that quietly disable the cache: WooCommerce carts, logged-in sessions, and cookie-based personalisation.

Prerequisites

You need LiteSpeed Web Server running on the cPanel box, not Apache. If you're still on Apache, walk through installing LSWS on a cPanel box first — LSCache requires LSWS as the web server, it won't work on top of stock Apache.

You also need:

  • WHM root access
  • The LiteSpeed WHM plugin (installed automatically with LSWS)
  • An active LSWS licence — LSCache is bundled, no separate licence needed

Confirm LSWS is serving traffic:

curl -I https://anysite.example/ | grep -i server

You should see Server: LiteSpeed. If not, stop here — the cache layer won't engage.

Step 1 — Auto-install the LiteSpeed Cache plugin fleet-wide

In WHM → LiteSpeed Web ServerWordPress Cache Manager, click Scan. The plugin walks /home/*/public_html and every addon-domain document root, fingerprints WordPress installs, and reports back with three columns:

  • WordPress installs found — total count detected
  • LSCache plugin installed — sites that already have the plugin
  • Cache enabled — sites where the plugin is installed and activated

Click Enable on all to install and activate the LiteSpeed Cache plugin on every detected install. Behind the scenes this drops the plugin into wp-content/plugins/ and activates it via WP-CLI as the owning cPanel user (not as root — file ownership is preserved).

On a server with 150 WordPress installs, the scan takes 30-90 seconds and the mass-enable takes 2-4 minutes.

Step 2 — Set sensible defaults on the cache itself

The plugin's default settings work, but two non-default values save real CPU.

In WHM → LiteSpeed Web ServerLSWS ConfigurationCache Settings (server context):

  • Enable Cache1
  • CheckPublicCache1
  • CheckPrivateCache1
  • Max Object Size10000000 (10 MB; default 1 MB drops large pages out of cache)
  • Max Cache Age604800 (7 days, up from default 1 day; the plugin invalidates on post update anyway)
  • Storage Path/usr/local/lsws/cachedata/ (default; just confirm the partition has 10+ GB free)

Save and click Graceful Restart. No traffic is dropped — workers cycle one at a time.

Step 3 — Verify cache hits on a sample site

Pick any WordPress site on the server and request a public page twice:

curl -I https://samplesite.example/
curl -I https://samplesite.example/

The second response should include:

x-litespeed-cache: hit

The first will show miss. If both show miss, the page isn't being cached. Common reasons, in order of frequency:

  1. A cookie marks the request as private. Logged-in users, ecommerce carts, and wp-admin traffic are excluded from the public cache by design. Test as a logged- out anonymous visitor.
  2. A query string is breaking the cache key. UTM parameters (?utm_source=...) default to busting cache. Configure them as cacheable under Cache → Browser → Excludes in the per-site plugin settings.
  3. A Cache-Control: no-cache header is set elsewhere. Check .htaccess for leftover Apache cache rules, and any security plugin that aggressively sets no-cache headers.

Step 4 — Configure for WooCommerce and logged-in traffic

If any site on the server runs WooCommerce, BuddyPress, LearnDash, or any other plugin that needs per-user state, you need the ESI (Edge Side Includes) settings. LSCache can cache the page shell publicly while punching holes for cart counts, greeting messages, and other per-user fragments.

Per-site, in the WordPress admin → LiteSpeed CacheCacheESI:

  • Enable ESION
  • Cache Admin BarOFF
  • Cache Comment FormON
  • ESI Nonce — leave default plus add any plugin-specific nonces in the textbox

For WooCommerce specifically, ensure the LiteSpeed Cache plugin's WooCommerce section has Product Update Interval set to Purge product on changes that affect the product page and Use Front Page TTL for the Shop Page is on.

Without ESI, every page on a WooCommerce site is treated as private and never enters the public cache — you'll see your cache hit ratio sit near zero.

Step 5 — Monitor cache hit ratio

WHM → LiteSpeed Web ServerReal-Time Statistics shows a Cache Hit Rate line. Healthy values:

  • Static asset cache hit rate — should be 95%+ within an hour
  • Public page cache hit rate — should be 60-85% on a typical content site, 30-50% on an ecommerce site, 10-30% on a heavily personalised site

If public cache hit rate stays under 10% on a content site after a day of traffic, you have a misconfiguration — almost always cookies, query strings, or a security plugin emitting Cache-Control: no-store.

Common gotchas

  • CloudLinux LVE interaction: LSCache hits don't consume entry processes (EP), so caching dramatically lowers EP pressure on heavy WordPress users. If you tuned LVE limits before enabling LSCache, revisit them — most operators can tighten EP by 50% post-cache.
  • Jetpack and other CDN integrations: If a site is fronted by Jetpack's CDN, the origin LSCache only sees CDN-cache misses. The hit rate looks low at origin even when the user experience is fast.
  • Cron-based purges: WordPress emits cache purges on post update. If a site has WP-Cron disabled and uses an external cron, ensure that cron is firing — stale cache is the symptom.
Do I need a separate LSCache license?+
No. LSCache is bundled with every LiteSpeed Web Server license. The WordPress plugin is free and lives in the WordPress.org plugin directory.
Will LSCache work with OpenLiteSpeed?+
Yes, the cache engine is identical — but OLS lacks cPanel integration, so the WHM mass-deploy step doesn't apply. On OLS you install the LiteSpeed Cache WordPress plugin per-site manually. See the LSWS vs OLS comparison for the full integration differences.
Does LSCache cache logged-in WordPress users?+
By default, no — logged-in users always see fresh, uncached pages. The private cache feature can cache per-user pages, but it's off by default to avoid leaking session-specific content to anonymous visitors.
How do I purge the LSCache from outside WordPress?+
Two ways: the WHM plugin has a 'Purge All' button at the server level, or you can run /usr/local/lsws/bin/lswsctrl restart from the shell. The plugin also exposes WP-CLI commands (wp litespeed-purge all).
Does LSCache work with WooCommerce?+
Yes — but you must enable ESI mode in the plugin settings so cart and user-state fragments can be punched into otherwise-public pages. Without ESI, WooCommerce pages are treated as private and never cache publicly.

Next steps

Switch in an afternoon

Switch from your current reseller — free.

We migrate active cPanel, Plesk, LiteSpeed and CloudLinux licenses from any reseller. We prorate the first month so you never pay twice, and your customers see zero downtime during the swap.