In short
LiteSpeed Cache (LSCache) is a free plugin that speeds up WordPress sites on a LiteSpeed web server with server-side page caching, image compression, CSS/JS minification and Redis/Memcached object caching. Do it in this order: turn on page caching and confirm the x-litespeed-cache: hit header, then add minification and image optimization. Enable risky options like JS combine and defer one at a time, testing after each.
In this guide
- How is LiteSpeed Cache different from other caching plugins?
- Installing the plugin and confirming the cache works
- Cache tab: recommended values
- Image optimization and lazy load
- CSS and JS settings: biggest gains, biggest risk of breakage
- Object cache: setting up Redis or Memcached
- Browser cache and the crawler
- Recommended order of setup
- Next step: hosting where LSCache works fully
LiteSpeed Cache (LSCache for short) is a free plugin that caches your WordPress site at the server level and puts image, CSS and JavaScript optimization in a single dashboard. To get the LiteSpeed Cache settings right, first turn on page caching and confirm it works, then enable optimizations one at a time and test your site after each step. This guide gives you recommended values for every tab and explains which setting can break what.
How is LiteSpeed Cache different from other caching plugins?
LSCache has two parts: the plugin inside WordPress and a cache engine built into the web server itself. When someone requests a cached page, PHP and the database never run; the server sends the HTML directly. That is the key difference from PHP-based caching plugins, and it noticeably cuts CPU usage under heavy traffic.
There is one requirement: the plugin's page cache only works on a LiteSpeed web server (LiteSpeed Enterprise or OpenLiteSpeed). On Apache or Nginx you can only use the optimization features. If you want to understand the server-side differences, see our LiteSpeed vs. Apache vs. Nginx comparison. On Sunucu Atlas LiteSpeed-based WordPress hosting plans, the server cache is ready the moment you install the plugin.
Installing the plugin and confirming the cache works
- In your WordPress dashboard, go to Plugins > Add New, search for "LiteSpeed Cache", then install and activate it.
- If you use another page caching plugin, deactivate it. Running two cache layers at once leads to stale pages and purge problems.
- Under LiteSpeed Cache > Cache, set "Enable Cache" to On and save.
- Open your site twice in a private window while logged out. In your browser's developer tools (F12 > Network), check the response headers of the main document.
On the second visit you should see this header:
x-litespeed-cache: hitSeeing miss on the first visit is normal. If the header stays at miss or is missing entirely, the page is excluded, a cookie is bypassing the cache, or the server is not running LiteSpeed. You can run the same check from the command line:
curl -sI https://alanadiniz.com/ | grep -i x-litespeedCache tab: recommended values
| Setting | Recommended | Notes |
|---|---|---|
| Enable Cache | On | The core setting; everything else depends on it |
| Cache Logged-in Users | Off (unless it is a membership site) | When on, a separate copy is stored per user, which increases disk and CPU usage |
| Cache Commenters | On | Serves fast pages to visitors whose comments are awaiting moderation |
| Cache REST API | On | Speeds up block editor and theme requests |
| Cache Login Page | On | Reduces wp-login.php load during bot attacks |
| Cache Mobile | Off | Turn it on only for themes that output different HTML on mobile |
TTL: how long should the cache stay valid?
TTL (Time To Live) is how long, in seconds, a cached page stays valid. The default public TTL is 604800 seconds, or one week. Because LSCache automatically purges the related pages and archives when you publish or update a post, a long TTL will not leave your content stale. You can shorten it for pages that pull prices or stock levels from an external source.
Purging and exclusions
In the Purge tab, keep "Purge All On Upgrade" off; wiping the entire cache on every plugin update puts unnecessary load on the server. Add pages that should never be cached to the URI list in the Excludes tab, one per line:
/hesabim/
/odeme-sonuc/
/teklif-formu/If you run WooCommerce, the plugin automatically excludes the cart, checkout and account pages, so you do not need to add them manually.
Image optimization and lazy load
LSCache compresses images through the QUIC.cloud service: images are sent to a compression queue, and the optimized versions are pulled back to your site. That means you first need to connect QUIC.cloud from the General tab. Recommended values:
- Auto Request Cron: On. Newly uploaded images are queued in the background.
- Optimize Original Images / keep backups: On. You can roll back if you do not like the result; keep in mind that it uses more disk space.
- Lossless compression: Off for photo-heavy sites, since lossy compression produces much smaller files. On if sharpness on product pages is critical.
- Create WebP (or AVIF) versions and replace images: On. Browsers that support them get a smaller format.
- Remove EXIF data: On. Camera and location data is stripped and files get smaller.
Lazy load, under Page Optimization > Media, loads images only as they approach the viewport. Exclude the logo and large hero banner that appear above the fold; otherwise your Largest Contentful Paint (LCP) gets worse. Just add the file name or CSS class to the "Lazy Load Image Excludes" field.
CSS and JS settings: biggest gains, biggest risk of breakage
Do not turn on all the Page Optimization settings at once. After each change, purge the cache and test the menu, slider, contact form and any add-to-cart button in a private window.
| Setting | Recommended | What can break |
|---|---|---|
| CSS Minify | On | Rarely causes problems |
| CSS Combine | Enable after testing | Layout and style shifts if file order changes |
| Generate UCSS (remove unused CSS) | Enable after testing | Missing styles for menus and popups that open later |
| Generate Critical CSS and load CSS asynchronously | On | A brief flash of unstyled content on load |
| JS Minify | On | Rarely causes problems |
| JS Combine | Off | "is not defined" errors in jQuery-dependent scripts |
| Load JS: Deferred | Start with Deferred; test Delayed separately | Slider, cart button or cookie notice stops working |
| HTML Minify | On | Rarely causes problems |
UCSS and Critical CSS are also generated on QUIC.cloud and go into a queue, so the first results can take a few minutes. Menu names and locations can change between plugin versions; for the current equivalents, see the official LSCache for WordPress documentation.
What to do when a script breaks
- Open the browser console (F12 > Console) and note the error and the file it comes from.
- Add that file name to the "JS Excludes" or "JS Deferred Excludes" list. For jQuery-related problems, this line is often enough:
jquery.min.js - Purge the entire cache from LiteSpeed Cache > Toolbox > Purge and test again.
- If the problem continues, revert the last setting you enabled. This is exactly why you turn settings on one at a time.
Object cache: setting up Redis or Memcached
The page cache stores the HTML sent to visitors. An object cache keeps the results of database queries WordPress runs over and over in memory. It makes a difference where page caching does not apply, such as the admin dashboard, the WooCommerce cart and logged-in users.
- First find out whether Redis or Memcached is running in your hosting environment. If the service is not available, turning this feature on will not speed up your site; it will cause errors.
- Under LiteSpeed Cache > Cache > Object, choose the method and enter the host and port. The default ports are 6379 for Redis and 11211 for Memcached. If a Unix socket is used, enter the socket path in the host field and set the port to 0.
- Do not leave the setting on until the "Connection Test" line shows a successful result.
- The default object lifetime (360 seconds) works for most sites.
If the connection test fails or your site gets slower, turn the object cache off; the page cache delivers the main gains anyway. To find out which services are available on your account, open a ticket with the Sunucu Atlas support team.
Browser cache and the crawler
Turn on the browser cache in the Browser tab. The default TTL of 31557600 seconds (one year) suits static files such as CSS, JS and images; because LSCache renames the files it optimizes, updated files still get refreshed.
The crawler visits the pages on your site in sequence to warm up the cache ahead of time. On shared hosting it can use up your CPU limit, so leave it off on small sites and run it at a low rate on sites with thousands of pages. If you hit a resource limit while it runs, follow the steps in our guide to the 508 Resource Limit Is Reached error.
Recommended order of setup
- Turn on the page cache and confirm the
x-litespeed-cache: hitheader. - Enable the browser cache plus HTML, CSS and JS minification.
- Enable image optimization and WebP; exclude above-the-fold images from lazy load.
- Turn on Critical CSS and JS defer, then test every page template.
- If the service is available, enable the object cache only after the connection test succeeds.
- Compare before-and-after results in PageSpeed Insights. To interpret the scores, see our PageSpeed and Core Web Vitals guide.
Once you have a working configuration, export your settings from Toolbox > Import / Export. If something breaks after an update or an experiment, you can restore everything from a single file.
Next step: hosting where LSCache works fully
No matter how good your settings are, the plugin's page cache only kicks in on a LiteSpeed web server. Sunucu Atlas WordPress hosting plans come with the LiteSpeed web server, NVMe storage, a free SSL certificate and one-click WordPress installs through WP Toolkit, so you can apply every setting in this guide from day one. For a single business site, blog or small store, the SA-WP-2 WordPress plan with 2 GB RAM, 2 CPU cores and 40 GB NVMe storage is a balanced starting point; you can also add a second site as an addon domain.
Frequently asked questions
Does LiteSpeed Cache work on Apache or Nginx servers?
You can install the plugin, but its page cache only works on a LiteSpeed web server. On Apache or Nginx you can only use features such as image and CSS/JS optimization.
Can I use LiteSpeed Cache with another caching plugin?
Do not run two page caching plugins at the same time. It causes stale pages and purge problems; if you use LSCache, deactivate the other caching plugin.
My changes are not showing on the site. What should I do?
Purge the page or the entire cache from the LiteSpeed Cache menu in the admin bar, then open the page in a private window. If your browser is holding an old CSS file, do a hard refresh.
Is LiteSpeed Cache safe for WooCommerce?
Yes. Cart, checkout and account pages are excluded from the cache automatically. Still, always test add-to-cart and checkout after changing JS defer and combine settings.
Do I have to enable the object cache?
No. The page cache delivers the biggest gains. Only enable the object cache if a Redis or Memcached service is available and the connection test succeeds.