LSCache is LiteSpeed’s full-page cache, comparable to Nginx FastCGI cache but managed inside LSWS rather than as a reverse proxy layer. On a cPanel + LiteSpeed host, LSCache + the LSCache WP plugin is the highest-leverage performance win for WordPress accounts. The module ships with LSWS but the storage directory and the cache policy need explicit setup; without those, the LSCache WP plugin loads but caches nothing.
What’s happening
LSCache stores fully-rendered HTML responses keyed by URL + cookie state. When a request arrives, LSWS checks the cache before invoking PHP at all — if there is a hit, the response is served from disk in microseconds. The cache module needs a storage path with enough disk space and the right ownership, and a cache root directive in the LSWS config. The LSCache WP plugin uses the LSWS-provided ESI tag conventions to mark logged-in users (uncached) versus anonymous (cached), without operator intervention.
How to verify
Check what is in place:
/usr/local/lsws/bin/lshttpd -v
ls /usr/local/lsws/cachedata/ 2>/dev/null
grep -i "lscache\|cacheroot" /usr/local/lsws/conf/httpd_config.conf
curl -sI https://example.com/ | grep -i "x-litespeed-cache"
The curl is the most telling: a response from LSCache contains X-LiteSpeed-Cache: hit or miss. If the header is absent entirely, the module is not engaged for that vhost.
The fix
- Confirm LSWS Enterprise or LSWS Open Source 1.7+ is installed (LSCache is included in both).
lshttpd -vshould match. - Create the cache storage directory:
mkdir -p /usr/local/lsws/cachedata && chown nobody:nobody /usr/local/lsws/cachedata && chmod 755 /usr/local/lsws/cachedata. cPanel + LSWS runs asnobody:nobodyfor the LSWS master; ownership matters because LSWS writes cache entries as that user. - LSWS Admin (
https://example.com:7080/) > Server Configuration > General > Cache Storage Root > set to/usr/local/lsws/cachedata. Graceful restart LSWS. - Confirm the module loaded: at LSWS Admin > Service Manager, the cache module should show as enabled. The shorthand check:
curl -sI https://any-vhost/returns anX-LiteSpeed-Cacheheader now even if it ismiss. - For each WordPress account on the server, the customer installs the LSCache WP plugin from the WordPress plugin directory. The plugin auto-detects the LSWS cache module and starts caching anonymous responses immediately. Logged-in users bypass the cache.
- Validate cache hits. Open an anonymous browser, hit the home page twice, check the response header: first request
X-LiteSpeed-Cache: miss, second requesthit. If the second hit is still a miss, the LSCache WP plugin is not configured (Cache > Cache > Enable Cache must be On).
For environments where LSCache is the standard performance baseline, Stack Harbor confirms its activation on every WordPress account during onboarding under cPanel server administration.