This is an old revision of the document!
Troubleshooting Guide For LSCWP
Here are a few common issues and how to deal with them. Please follow these steps first before logging any ticket with us since your issue might have been resolved.
Verify the Issue is Related to LSCache
- LSCache plugin should be activated
- LDCache should be enabled
- Navigate to LiteSpeed Cache > Settings > Debug and set Disable All Features to
ON
Is the issue gone? Then the issue is probably related to LSCache.
Are you still having a problem? Then it is not an LSCache issue.
Are you still using an old version of LSWCP?
Our LSWCP plugin has been developed at a very fast pace. Some compatibility issues with other plugins may have already been fixed in the latest version. You should always upgrade to the latest version before logging a ticket.
Common Issues
LSCache Compatibility
If a page fails to load or does not load correctly, you may have a compatibility problem. Here's how to check which feature of the plugin causes the issue:
- Keep LiteSpeed Cache plugin activated
- Set LiteSpeed Cache > Settings > Debug > Disable All Features to
ON
- Refresh the page see if it loads correctly
- If yes, turn on the cache and optimization functions one by one. Each time you turn on a new feature, you will need to Purge All and refresh browser.
- If no, the compatibility issue is probably not related to LSCache
CSS/JS Optimization
Try the following steps to pinpoint CSS and JavaScript errors:
- Turn off optimization. From the WordPress Dashboard, navigate to LiteSpeed Cache > Settings > Optimize and set all of the following to OFF: CSSMinify, CSS Combine, CSS HTTP/2 Push, JS Minify, JS Combine, JS HTTP/2 Push.
- Purge the cache. Navigate to LiteSpeed Cache > Manage > Purge and press the Purge All button.
- Check your site. Reload the page. Does it still look bad? If no, follow wiki
Note: Sometimes, even when Critical CSS is enabled, the site may flash unstyled content during load. This is because the CSS file is not yet loaded due to Asynchronous loading of CSS. This is especially an issue in FireFox.
Image Optimization
There are a few different kinds of errors that you may see when optimizing images. Take a look at Image Optimization Errors.
CDN Support
You can narrow down CDN issues through the following steps:
- Visit the CDN URL and verify that it is accessible
- Check your CDN settings
- View Page Source, and verify that links are indeed pointing to the CDN URL.
LiteSpeed Cache is Disabled
If you see a warning that indicates LiteSpeed Cache is disabled, the warning itself may give a clue as to the source of the problem.
The LSCache Module is disabled at the server level
This indicates that cache is turned off at the highest level. You will need to configure your server, or have your hosting provider do it for you.
LiteSpeed Cache is disabled in the plugin settings
This indicates that you haven't turned on caching in the plugin settings. Do so, and the problem should be solved.
LiteSpeed Cache is disabled
This is a generic error that doesn't indicate any cause. Navigate to LiteSpeed Cache > Report and look at the Report Summary. The Server Variables
section right at the top can give you some helpful information. Check the values of the following variables:
LSCACHE_ADV_CACHE = true
- If this value isNULL
, look for thewp-content/advanced-cache.php
file which should include the linedefine('LSCACHE_ADV_CACHE', true);
. If the line exists, then it may be a permissions issue. Simply fix by removing theadvanced-cache.php
file, and deactivating and reactivating the LiteSpeed Cache plugin. The file will be correctly regenerated. NOTE: Sometimes you do this, and the plugin still doesn't work. In this case, Navigate to LiteSpeed Cache > Settings > Advanced and disable Check Advanced Cache.LITESPEED_ON = true
- IfLSCACHE_ADV_CACHE = null
, then this will always beNULL
. Otherwise, if this value isNULL
, it means that you are not running with LiteSpeed Web Server. This is allowed, but it limits the functions that you are able to use. Learn more.LITESPEED_ON_IN_SETTING = true
- If this value isNULL
, navigate to the Settings > General page and set Enable LiteSpeed Cache toEnable
WebP Images Not Loading
If you've generated WebP images through Image Optimization, but they are not showing on the front end, try these steps:
- Make sure you are using a browser that supports WebP. Not all of them do.
- Navigate to Litespeed Cache > Settings > Media and make sure that the Image WebP Replacement option is set to
ON
. - If it's on, then from Settings > Debug, set Debug Log to
ON
and Debug Level toAdvanced
. Clear the cache, load your page, and check the debug log. Don't forget to turn the log off again when you are finished troubleshooting. - If the debug log doesn't offer any explanation, try disabling and re-enabling WebP replacement. Sometimes that can fix this issue.
Some CSS Files Not Properly Reloaded After Update
Most likely, this is not an LSCache issue, since LSCWP doesn't cache static files.
If your theme's CSS is not properly loaded after an update, check your browser cache. Does the reload work? Do you have a CDN or a reverse proxy in front of your webserver, such as CloudFlare? These caching mechanisms may need to be purged. See this forum post for more details.
Forced Caching
Sometimes, in an effort to make sure that certain pages are always cached, you erroneously force the entire site to be cached. Forcing this is not a good idea, because you never know when there will be individual exceptions to caching.
Navigate to LiteSpeed Cache > Settings > Excludes and look in the Force Cache URIs box. If you see /
or *
there, then you will need to remove it. Save, and then Purge All LSCache.
Lazy Load
If you find some images should not be lazy loaded, you can exclude them in LiteSpeed Cache > Settings > Media. Add the URL to Lazy Load Image Excludes.
Alternately, if you are a developer, you can add the attribute data-no-lazy=“1”
to the image in your HTML code.
Logged-in Users Appearing as Logged-out
This problem is caused when using multiple web applications under a single domain. You can find more information on this issue and how to resolve it in our Handling Logged-in Cookie Conflicts page.
Advanced Issues
Cache Always Misses
If you always see X-LiteSpeed-Cache: miss
in the headers, then something is wrong. See if any of the following steps help:
- Disable and then re-enable LSCache.
- In the Debug settings tab, disable Check Advanced Cache.
- Verify that the cache folder has the proper permissions (0755)
Currency/Language Switcher Plugins
Because these plugins are mostly PHP session-based, there's no way to fix the caching on our end. The plugin author needs to change their code to be compatible with LSCache. See the API for more information on how to do that.
EU Cookie Consent
If you have EU Cookie Consent on your site, you will need a cache vary. Varying on the cookie allows two versions of each page to be stored in cache - one for people who have consented to the cookie, and one for those who have not yet done so.
Add the following line to .htaccess
:
RewriteRule .* - [E=Cache-Vary:euCookie]
Provide Report Number
If you have been through these troubleshooting steps, and you still require support, we may ask to see your Environment Report. The Environment Report tells us what settings you have enabled, what other plugins you have installed, and the contents of your .htaccess
file, among other useful things.
To generate and share your Environment Report, navigate to LiteSpeed Cache > Report. Press the Send to LiteSpeed button. You can learn more about the Environment Report here.