Resolving 'Page Cache Not Detected' Warnings in LiteSpeed Cache
Content
A common issue reported by WordPress users of the LiteSpeed Cache plugin is the Site Health tool showing a warning: 'Page cache is not detected' or 'No client caching response headers were detected.' This warning can appear even when the plugin is active and configured. This guide explains why this happens and provides the most common solutions to resolve it.
Why This Warning Appears
The WordPress Site Health tool performs a test to determine if a page cache is active. It looks for specific HTTP response headers that are sent by caching systems. If these headers are missing, it assumes no page cache is present. For the LiteSpeed Cache plugin, the crucial header is X-LiteSpeed-Cache.
There are several reasons why this header might not be present, causing the warning:
- Incorrect Server Environment: The full caching functionality of the LiteSpeed Cache plugin requires a LiteSpeed web server (OpenLiteSpeed or Enterprise) or a QUIC.cloud CDN subscription. If your site runs on Apache or NGINX (without LiteSpeed), the core page caching features will not work, though other optimizations like CSS/JS minification still will. This is the most common cause of this warning.
- Server Misconfiguration: Even on a LiteSpeed server, the hosting provider must properly configure the server-level cache engine. An incorrect server configuration will prevent the plugin from generating cached pages.
- Logged-in User View: The plugin will not serve cached pages to logged-in administrators. You must test as a logged-out guest user to see the correct cache headers.
- Plugin or Theme Conflicts: Code from another plugin or your theme can explicitly tell LiteSpeed Cache not to cache a page, often via a constant like
DONOTCACHEPAGE. - CDN or Proxy Interference: A Content Delivery Network (CDN) like Cloudflare can sometimes strip or interfere with the caching headers before they reach WordPress's Site Health test.
How to Troubleshoot and Fix the Issue
1. Verify Your Server Environment
First, confirm what web server software your hosting provider uses. You can often find this information in your hosting control panel (e.g., cPanel) or by asking your provider's support team. Remember:
- LiteSpeed Web Server: Full page caching is available.
- Apache or NGINX: Page caching is not available. The Site Health warning is expected and you can safely ignore it if performance is acceptable, as other plugin features are still active.
2. Generate and Provide a Report Number
If you are on a LiteSpeed server and see this warning, the next step is to generate a diagnostic report. This is the most critical piece of information for troubleshooting.
- In your WordPress admin panel, go to LiteSpeed Cache -> Toolbox -> Report.
- Click the 'Send to LiteSpeed' button.
- Copy the generated 'Report Number' (e.g.,
SCKMUCBS) and provide it when seeking help. This number allows others to review your site's configuration without needing admin access.
3. Test as a Logged-Out User
WordPress Site Health may run its test while you are logged in. To check if caching is working for visitors:
- Log out of WordPress.
- Open your browser's Incognito or Private mode.
- Visit your homepage.
- Open your browser's Developer Tools (F12) and go to the Network tab.
- Reload the page and click on the first document request (usually your domain name).
- Look at the 'Response Headers' for the
X-LiteSpeed-Cacheheader. If you seehitorhit.locked, your cache is working correctly.
4. Check for Configuration Conflicts
If you are on a LiteSpeed server but headers are still missing, a conflict might be preventing caching.
- CDN Settings: If you use Cloudflare or another CDN, ensure its own page caching is disabled. The LiteSpeed Cache plugin should be the sole source of page caching.
- Theme/Plugin Code: Search your theme's
functions.phpfile and other plugins for code that might set theDONOTCACHEPAGEconstant to true. You can try adding the following code to your theme'sfunctions.phpfile to forcefully set it to false:add_filter( 'litespeed_const_DONOTCACHEPAGE', '__return_false' ); - Debug Logs: Enable the plugin's debug log (Toolbox -> Debug Settings) to see detailed reasons why a page is or is not being cached.
5. Contact Your Hosting Provider
If all else fails and you are on a LiteSpeed server, the issue is likely a server configuration problem that only your hosting provider can resolve. Provide them with your Report Number and ask them to verify that the LiteSpeed cache engine is configured correctly for your account.
Conclusion
The 'Page cache not detected' warning can be confusing. In many cases, it's simply because the site isn't on a LiteSpeed server, and the warning can be ignored. For sites on LiteSpeed servers, the solution typically involves checking for conflicts, verifying cache headers as a guest, and ultimately working with your hosting provider to ensure the server is configured properly. Generating a report number is always the best first step for getting targeted help.
Related Support Threads Support
-
Page Cache not detectedhttps://wordpress.org/support/topic/page-cache-not-detected-3/
-
Page caching is not detectedhttps://wordpress.org/support/topic/page-caching-is-not-detected-3/
-
feedshttps://wordpress.org/support/topic/feeds-11/
-
404 errorhttps://wordpress.org/support/topic/404-error-450/
-
Provoque des erreurs 502 sur le sitehttps://wordpress.org/support/topic/provoque-des-erreurs-502-sur-le-site/
-
The presence of a page cache is not detected and probl the automatically loadedhttps://wordpress.org/support/topic/the-presence-of-a-page-cache-is-not-detected-and-probl-the-automatically-loaded/
-
No cache due to Admin pagehttps://wordpress.org/support/topic/no-cache-due-to-admin-page/
-
Status of the website: Page cache was not recognized…https://wordpress.org/support/topic/status-of-the-website-page-cache-was-not-recognized/
-
Cache problems for # linkshttps://wordpress.org/support/topic/cache-problems-for-links/
-
“Save Changes” Button Missing in Cache Options Tab and Page Cache not detectedhttps://wordpress.org/support/topic/save-changes-button-missing-in-cache-options-tab-and-page-cache-not-detected/
-
cache misshttps://wordpress.org/support/topic/cache-miss-6/
-
Suddenly cache not working and breaking the websitehttps://wordpress.org/support/topic/suddenly-cache-not-working-and-breaking-the-website/
-
Page unavailable – too many redirectshttps://wordpress.org/support/topic/page-unavailable-too-many-redirects/
-
Page cache is not detected and the server response time is slowhttps://wordpress.org/support/topic/page-cache-is-not-detected-and-the-server-response-time-is-slow-10/
-
home page is blankhttps://wordpress.org/support/topic/home-page-is-blank-6/
-
Unwanted notification spamhttps://wordpress.org/support/topic/unwanted-notification-spam/
-
Page cache is detected but the server response time is still slow.https://wordpress.org/support/topic/page-cache-is-detected-but-the-server-response-time-is-still-slow-7/
-
Product pages are not cachedhttps://wordpress.org/support/topic/product-pages-are-not-cached/
-
when ever i post a new content, it dose-not refresh on home pagehttps://wordpress.org/support/topic/when-ever-i-post-a-new-content-it-dose-not-refresh-on-home-page/
-
Ajax status 403 after cachehttps://wordpress.org/support/topic/ajax-status-403-after-cache/
-
Cache not clearing and unable to see changeshttps://wordpress.org/support/topic/cache-not-clearing-and-unable-to-see-changes/
-
Page cache not detected but server response time is okhttps://wordpress.org/support/topic/page-cache-not-detected-but-server-response-time-is-ok/
-
No available Cloudflare zone error messagehttps://wordpress.org/support/topic/no-available-cloudflare-zone-error-message/
-
wordpress is sending my website to another websitehttps://wordpress.org/support/topic/wordpress-is-sending-my-website-to-another-website/
-
Page cache is not detected but the server response time is OKhttps://wordpress.org/support/topic/page-cache-is-not-detected-but-the-server-response-time-is-ok-3/
-
the page cache was not detectedhttps://wordpress.org/support/topic/the-page-cache-was-not-detected/
-
Woo request not working, emails not sent…https://wordpress.org/support/topic/woo-request-not-working-emails-not-sent/
-
Object Cache Redishttps://wordpress.org/support/topic/object-cache-redis/