If LiteSpeed Cache left your WordPress site blank, stuck on old content, or serving cached pages to logged-in users, the fixes are below. LiteSpeed Cache for WordPress (LSCWP) is the caching plugin built for the LiteSpeed web server, and most of its production failures follow three patterns. A white screen almost always comes from a hidden PHP fatal error, or from a JavaScript conflict caused by minification, which shrinks and merges script files. Stale pages mean a purge, the step that throws away an old cached copy, never fired or never reached your CDN (content delivery network). Logged-in users get cached pages when LSCWP fails to recognize their login cookie. Each section below gives the root cause and a step-by-step fix.
How to verify
Before diagnosing, establish a baseline with raw HTTP headers — they tell you which layer served the response and what the cache policy is:
# Basic cache header check — what layer served this?
curl -sI https://example.com/ | grep -iE 'x-litespeed-cache|cache-control|set-cookie|cf-cache-status'
# Bypass cache to see the PHP-generated page directly
curl -sI https://example.com/?nocache=1 2>/dev/null
# or use the LSCWP debug cookie:
curl -sI https://example.com/ -H "Cookie: litespeed_guest=0"
# Check current LSWS and LSCWP versions
/usr/local/lsws/bin/lshttpd -v
wp plugin get litespeed-cache --field=version
# Enable LSCWP debug log temporarily
wp eval 'update_option("litespeed.conf.debug", 1);'
tail -f /usr/local/lsws/Example/html/wp-content/litespeed/debug.log
# After debugging, disable the log
wp eval 'update_option("litespeed.conf.debug", 0);'
What’s happening
White screen after enabling LSCWP is almost always a PHP fatal error that WordPress is suppressing, or a JavaScript conflict caused by LSCWP’s JS minification and combination. When LSCWP minifies and combines JS files, it changes the load order and may break scripts that depend on being loaded in a specific sequence or from a specific URL. The resulting JS error causes the entire page to appear blank if the error occurs in a critical script.
Stale pages occur when LSCWP has cached a page and an event that should trigger a purge fails to do so. This can happen because: a post was updated via a mechanism that does not fire the save_post hook (direct database edit, REST API without the WordPress hook layer, an import plugin), the purge succeeded at LSWS but not at an upstream CDN, or LSCWP’s smart purge configuration does not include the correct page types.
Logged-in users seeing cached pages happens when LSCWP’s logged-in user bypass is misconfigured or the WordPress login cookie name is non-standard. LSCWP identifies logged-in users by the presence of the wordpress_logged_in_* cookie. If your site uses a custom cookie prefix (set via COOKIE_HASH in wp-config.php) or if a security plugin renames the login cookie, LSCWP may not recognize the user as logged in and may serve them a cached public page.
The procedure
White screen after enabling LSCWP
Step 1 — Determine if it is JS or PHP.
Access the site with all cache bypassed and check for PHP errors:
curl -sI https://example.com/?nocache=1 | grep -i 'content-type\|x-litespeed'
curl -s 'https://example.com/?nocache=1' | head -50
If the non-cached URL loads correctly and the cached URL is blank, the issue is LSCWP’s optimization pipeline, not WordPress itself.
Step 2 — Disable JS optimization first.
Go to LiteSpeed Cache → Page Optimization → JS Settings and disable:
- JS Minify
- JS Combine
- JS Combine Inline
Clear the LSCWP cache (wp litespeed-purge all) and reload. If the white screen resolves, re-enable JS options one at a time to identify the specific setting causing the conflict.
Step 3 — Disable CSS optimization if JS was not the cause.
Go to LiteSpeed Cache → Page Optimization → CSS Settings and disable:
- CSS Minify
- CSS Combine
- Critical CSS
Step 4 — Check LSWS error log for PHP fatals.
tail -50 /usr/local/lsws/logs/error.log | grep -i 'php\|fatal\|error'
tail -50 /var/log/php-fpm/error.log 2>/dev/null | grep -i fatal
A PHP fatal in a cached context may not show in the browser but will appear in the LSWS error log.
Step 5 — Identify the conflicting script.
If the white screen is JS-related, open your browser’s developer console on the white-screen page. JavaScript errors will appear in the Console tab. The error message and file path will identify which script is causing the problem. Add that script to LSCWP’s JS Excludes list under JS Settings.
Stale pages after content update
Step 1 — Confirm the purge is not firing.
Publish or update a test post and immediately check the cached version:
# After publishing, check if the old version is still cached
curl -s https://example.com/test-post/ | grep -i 'old-content-string'
curl -sI https://example.com/test-post/ | grep 'x-litespeed-cache'
If the old content is still returned with X-LiteSpeed-Cache: hit, the purge did not fire.
Step 2 — Check LSCWP purge settings.
Go to LiteSpeed Cache → Cache → Purge. Confirm:
- Auto Purge Rules includes
posts,pages, and any custom post types you update - Purge All On Upgrade is enabled
- Scheduled Purge is set to a reasonable interval as a fallback
Step 3 — Test a manual purge.
wp litespeed-purge post <post_id>
wp litespeed-purge url https://example.com/test-post/
If a manual purge resolves the stale content, the issue is the automatic purge trigger. Check whether the content update mechanism fires save_post.
Step 4 — If Cloudflare is upstream, confirm CDN purge.
# Verify Cloudflare API credentials in LSCWP
wp eval 'echo get_option("litespeed.conf.cdn-cloudflare_key") ? "API key set" : "API key missing";'
# Manual Cloudflare purge test (requires cf CLI or API call)
curl -X POST "https://api.cloudflare.com/client/v4/zones/$CF_ZONE_ID/purge_cache" \
-H "X-Auth-Email: $CF_EMAIL" \
-H "X-Auth-Key: $CF_API_KEY" \
-H "Content-Type: application/json" \
--data '{"files":["https://example.com/test-post/"]}'
Logged-in users seeing cached pages
Step 1 — Confirm the login cookie name.
# The logged-in cookie should contain the site's COOKIEHASH
wp eval 'echo LOGGED_IN_COOKIE;'
# Expected: wordpress_logged_in_<hash>
# Check what cookie is being sent in a logged-in browser session
# From the browser dev tools, inspect cookies on example.com
# Look for a cookie whose name starts with 'wordpress_logged_in_'
Step 2 — Verify LSCWP’s do-not-cache cookie list.
Go to LiteSpeed Cache → Cache → Excludes → Do Not Cache Cookies. The following must appear:
wordpress_logged_in_
comment_author_
wp-postpass_
woocommerce_cart_hash
woocommerce_items_in_cart
If wordpress_logged_in_ is missing, add it. This tells LSCWP never to serve a cached response when this cookie is present.
Step 3 — If a security plugin renames the login cookie.
Some security plugins (WP Hide, WPS Hide Login, custom hardening) change the wp-login.php path and may also change the login cookie name. If your cookie is named differently, add its actual name to the exclusion list.
Step 4 — Enable separate cache for logged-in users.
Go to LiteSpeed Cache → Cache → Cache Control and enable Cache Logged-in Users only if you want logged-in users to benefit from caching. If enabled, ensure Separate Cache for Logged-in Users is also on — this creates a distinct cache namespace for logged-in requests, preventing logged-in content from leaking to anonymous visitors.
Common pitfalls
LSCWP debug log left enabled in production. The debug log generates a new log entry for every request and can grow to gigabytes on a high-traffic site overnight. Always disable it after debugging: wp eval 'update_option("litespeed.conf.debug", 0);'
Purge-all during business hours causing a cache stampede. After a full purge, all pages must be re-cached on first visit. On a high-traffic site, every user for the next few minutes hits PHP instead of cache, causing a CPU spike. Schedule full purges for low-traffic windows, or use a cache warmer immediately after purging.
Mistaking Cloudflare’s CF-Cache-Status: HIT for LSCWP stale cache. If your diagnostic curl shows CF-Cache-Status: HIT but X-LiteSpeed-Cache is absent or shows miss, the stale content is coming from Cloudflare’s edge, not from LSWS. Purge at Cloudflare (Dashboard or API) to resolve it.
Critical CSS rendering a blank page on first visit. LSCWP can generate Critical CSS by making a server-side request to the page. If the page requires authentication to load, the Critical CSS generator gets a login page instead of the actual page CSS. Disable Critical CSS for password-protected or login-required pages.
Cached search results. WordPress search pages (/?s=query) should not be cached since search results are query-specific. Add ?s= to LSCWP’s Do Not Cache Query Strings exclusion list if search pages are appearing with cache hits.
Cache plugin failures are among the fastest ways to lose customer trust on a production site — a white screen or stale checkout page is immediately visible. Stack Harbor’s managed operations team monitors cache health continuously and responds to cache-related incidents as part of standard coverage.