Troubleshooting litespeed-cache plugin

So you made a change on your site in the wordpress admin and you are not seeing it reflected on your site in your browser. 

Caching is generally not enabled by default, but if one of your caching modules is sending a 'can be cached' header the server will receive that and cache it. 

If you have a CMS / Software that has a litespeed-cache plugin you should install and use that as it will provide the best caching experience on our shared servers, or your VPS/server if you choose to install litespeed on it. The plugin supplies several layers of performance boosts, utlizing page caching, ESI, as well as cache control functions for forcing the cache to  be purged, etc. 

Additionally in the settings there are options to disable some urls, or files, from being cached. You may need to do that to override caching those plugins calls. Although if you disable the caching it SHOULD stop caching everything. If caching is fully disabled, then in devtools (to open devtools in Chrome, press CTL+SHIFT+I) when you look at the headers, you should NOT see the line:

'x-litespeed-cache: hit'. 

You should see 'x-litespeed-cache: miss' or better, not see the 'x-litespeed-cache' line at all.

Here is a image showing the header:

 

 

When litespeed-cache is enabled in wordpress there is a little diamond at the top of the admin that will have a 'purge all' option. 

Like so: 

That should tell the server to clear everything from its cache. Other CMS's should have a similar function available.

Sometimes plugins are written that don't 'expect' that their responses might be cached, and require some extra settings to allow them to bypass the page cache. 

First try disabling the litespeed-cache plugin and see if it fixes the problem, if the problem goes away, then you just need to add those plugin urls to the ignore list and then turn it back on and hopefully everything will work nicely together.

You may also  try disabling some of the performance enhancements in the litespeed-cache module. For example I've found a few plugins that break when they have their javascript 'asynchronously loaded' and need their js files added to the 'do not optimize' box. The CSS minimizer sometimes does the same. Try flipping those settings on or off and see if it makes any difference.

Sometimes the error is NOT with lscache, and sometimes you are being affected by your browsers cache. To try to rule out if its your browser cache you can try a shift-click on the reload icon to force load the page content. If that doesn't work open up dev tools on the page (F12 in Chrome) and hold-click on the page refresh icon, and select 'Empty Cache and Hard Reload'. You can also try loading the page from a different browser to see if it picks up the change, also pointing to a local browser cache issue. 

You will want to check to make sure you don't have multiple cache plugins active. Having multiple cache plugins running concurrently can interfere with each other causing undesirable effects. I'd suggest that you try letting litespeed do its thing before choosing to go with a different plugin. 

Watching the site load in the devtools window may point towards some errors, javascript errors, or 404/500 errors showing up when those plugins are attempting to be used, etc., could point to things like the 'combine javascript' or 'combine css' functions putting libraries/files in the wrong order in which case they will need to be tracked down and excluded from the optimizations.

 

  • litespeed, cache, lscache, plugin
  • 64 Users Found This Useful
Was this answer helpful?

Related Articles

How to modify your hosts file.

What is your hosts file and why would you want to modify it? First we need a quick explanation on...

Remote email service but Autodiscover is finding the cPanel SSL cert

When using cPanel AutoSSL and a remote email service, you may sometimes encounter a problem where...

Setting up a development version of your site.

Sometimes you want to test out some new template changes, new modules or plugins, or sometimes...

How to block an IP in your .htaccess

Sometimes you have to stop an IP in it's tracks. Perhaps they are attempting to exploit your...

Linux Permissions

This is a basic, quick and dirty article on linux permissions. At EZProvider all of our servers...