Learning how to use LiteSpeed Cache with WordPress is one of the most effective steps you can take to improve your website's performance, reduce server load, and achieve better scores in Google PageSpeed Insights. LiteSpeed Cache (LSCache) is a free, feature-rich caching plugin that integrates deeply with LiteSpeed Web Server and also offers powerful optimization tools for sites on Apache and Nginx. In this guide, you will learn everything from initial installation to advanced fine-tuning.
What Is LiteSpeed Cache and Why Does It Matter?
LiteSpeed Cache is an all-in-one WordPress acceleration plugin developed by LiteSpeed Technologies. Unlike generic caching plugins, it communicates directly with the LiteSpeed Web Server at the server level, enabling full-page caching that is faster than PHP-based alternatives. Even on non-LiteSpeed servers, the plugin delivers value through its built-in CSS/JS minification, image optimization, database cleanup, lazy loading, and CDN integration.
Key Benefits of LiteSpeed Cache
- Server-level full-page caching — pages are served as static files, bypassing PHP and MySQL entirely.
- Object caching — supports Redis and Memcached to cache database queries.
- Image optimization (QUIC.cloud) — automatically converts images to WebP format.
- CSS and JavaScript minification & combination — reduces HTTP requests and file sizes.
- CDN support — integrates with QUIC.cloud CDN and third-party CDNs.
- Crawler — pre-warms the cache so visitors always receive cached pages.
Is LiteSpeed Cache Free?
Yes, the core plugin is completely free and available in the WordPress plugin repository. Some advanced features (such as higher QUIC.cloud CDN quotas and more image optimization credits) require a paid QUIC.cloud plan, but most small-to-medium websites can run entirely on the free tier.
Installing LiteSpeed Cache on WordPress
Installation follows the standard WordPress plugin workflow, but there are a few additional steps to confirm everything is working correctly on your server.
Installing via the WordPress Dashboard
- Log in to your WordPress admin panel and navigate to Plugins > Add New.
- In the search box, type LiteSpeed Cache and press Enter.
- Locate the plugin by LiteSpeed Technologies and click Install Now.
- Once installed, click Activate.
- A new LiteSpeed Cache menu item will appear in your left sidebar — click it to open the dashboard.
Installing via WP-CLI
If you prefer the command line, you can install and activate LiteSpeed Cache with a single WP-CLI command:
wp plugin install litespeed-cache --activate --allow-root
This is especially useful when managing multiple WordPress installs, deploying via scripts, or working in a staging environment. After running this command, the plugin will be installed and active immediately.
Verifying Server Compatibility
After activation, go to LiteSpeed Cache > Dashboard. The dashboard will display whether your server is running LiteSpeed Web Server. A green indicator means full server-level caching is available. An amber or grey indicator means you are on Apache or Nginx — you will still benefit from the optimization features, but full-page caching at the server level will not be active unless you configure it separately with your host.
Essential LiteSpeed Cache Settings to Configure First
The plugin ships with sensible defaults, but taking 10 minutes to review the core settings will unlock significantly better performance.
Cache Settings
- Navigate to LiteSpeed Cache > Cache and click the Cache tab.
- Set Enable Cache to ON.
- Enable Cache Logged-in Users only if you have a membership site where logged-in pages are the same for all users; otherwise leave it OFF.
- Enable Cache Commenters to serve cached pages to visitors who have left a comment.
- Set Default Public Cache TTL to at least 604800 (one week in seconds) for mostly-static content.
- Click Save Changes.
Enabling Browser Cache
- Go to the Browser tab within LiteSpeed Cache > Cache.
- Toggle Browser Cache to ON.
- Set the Browser Cache TTL to 31557600 (one year) for static assets like images, CSS, and JS.
- Save your changes.
Configuring the .htaccess and wp-config.php
LiteSpeed Cache may add rewrite rules to your .htaccess automatically. On some hosts, you may also want to add a constant to your wp-config.php to ensure the cache path is correctly defined:
// Add this line to wp-config.php before "That's all, stop editing!"
define( 'LSCACHE_DATA_DIR', WP_CONTENT_DIR . '/litespeed/cache/' );
This is optional but can help on servers with non-standard directory structures. Most users will not need to add this manually as the plugin detects the correct path automatically.
Optimizing CSS, JavaScript, and Images
Beyond caching, LiteSpeed Cache includes a full suite of front-end optimization tools. These settings can have a dramatic impact on your Core Web Vitals scores.
Minifying and Combining CSS and JavaScript
- Go to LiteSpeed Cache > Page Optimization.
- Under the CSS Settings tab, enable CSS Minify and CSS Combine.
- Enable CSS HTTP/2 Push if your server supports HTTP/2.
- Switch to the JS Settings tab and enable JS Minify.
- Enable JS Combine — note that this can occasionally break scripts; test your site after enabling.
- Enable JS Defer to defer non-critical JavaScript and improve Time to Interactive (TTI).
- Save changes and then visit your site in an incognito window to verify nothing is broken.
Enabling Lazy Load for Images
- In Page Optimization, click the Media tab.
- Toggle Lazy Load Images to ON.
- Enable Add Missing Sizes to help WordPress generate correct srcset attributes.
- Save changes.
Setting Up Image Optimization with QUIC.cloud
- Go to LiteSpeed Cache > Image Optimization.
- Click Request Credits — this links your site to a free QUIC.cloud account and provides a starting batch of image optimization credits.
- Once credits are assigned, click Send Optimization Request to begin optimizing existing images.
- Enable Auto Request Cron so new images are automatically optimized on upload.
- Enable WebP Replacement to serve WebP versions to supported browsers — WebP images are typically 25–35% smaller than JPEG equivalents.
Advanced Features: Object Cache, CDN, and Crawler
For high-traffic sites or those with dynamic content, LiteSpeed Cache's advanced features can push performance even further.
Enabling Object Caching with Redis
Object caching stores the results of expensive database queries in memory so they do not need to be re-executed on every page load. To enable Redis object caching:
- Confirm your host provides Redis (most managed WordPress hosts do — check your hosting control panel).
- Go to LiteSpeed Cache > Advanced and find the Object Cache section.
- Toggle Object Cache to ON.
- Select Redis as the method and enter your Redis host (usually
127.0.0.1) and port (usually6379). - Click Test Connection to verify, then save.
Connecting to QUIC.cloud CDN
- Navigate to LiteSpeed Cache > CDN.
- Click Link to QUIC.cloud and sign in or create a free account.
- Once linked, toggle QUIC.cloud CDN to ON.
- Configure which file types (CSS, JS, images, fonts) should be served from the CDN.
- Save and test your site to ensure all assets load correctly.
Using the Cache Crawler
The crawler visits your site's pages automatically and generates cached versions so your first real visitors always receive a cached response instead of a cache miss. To enable it:
- Go to LiteSpeed Cache > Crawler.
- Toggle Crawler to ON.
- Set the Crawl Interval slightly lower than your cache TTL — for example, if your TTL is 7 days, set the crawler to run every 6 days.
- Set Crawl Threads to a low value (1–2) to avoid overloading your server.
- Save and use the Run Crawler Now button to kick off an immediate crawl of your site.
Troubleshooting Common LiteSpeed Cache Issues
Even with a well-configured plugin, you may occasionally encounter issues. Here are the most common problems and how to fix them.
Pages Not Being Cached
If pages are not being cached, check the following:
- Make sure you are not logged in as an admin when testing — logged-in admin pages are excluded from cache by default. Use an incognito browser window.
- Check that no other caching plugins (such as W3 Total Cache or WP Super Cache) are active at the same time — they will conflict.
- Confirm the cache is enabled in LiteSpeed Cache > Cache.
- Look at the HTTP response headers in your browser DevTools — a cached page should include a header like
X-LiteSpeed-Cache: hit.
CSS or JavaScript Errors After Enabling Minification
If your site looks broken after enabling CSS/JS combine or minify:
- Go to Page Optimization and disable JS Combine first, as this is the most common culprit.
- Use the Exclude fields to whitelist specific scripts or stylesheets that should not be minified.
- Clear the LiteSpeed Cache (LiteSpeed Cache > Manage > Purge All) after making changes.
Purging the Cache Manually or via WP-CLI
Sometimes you need to purge the cache immediately after updating content. You can do this via the admin toolbar (LiteSpeed Cache > Purge All) or via WP-CLI:
wp litespeed-purge all
This command is invaluable in deployment scripts where you need to invalidate the cache automatically after pushing updates to production.
Frequently Asked Questions
Does LiteSpeed Cache work on Apache or Nginx hosting?
Yes. While server-level full-page caching requires LiteSpeed Web Server, the plugin's other features — including CSS/JS minification, image optimization, lazy loading, object caching, and CDN integration — work on any hosting environment including Apache and Nginx. Many shared hosts now offer LiteSpeed servers as well, so check with your provider.
Is it safe to use LiteSpeed Cache alongside other plugins like Elementor or WooCommerce?
Yes, LiteSpeed Cache is designed to work alongside popular page builders and eCommerce plugins. For WooCommerce, the plugin automatically excludes cart, checkout, and account pages from caching to prevent private data from being served to the wrong user. Always test your site after enabling caching and optimization features, and use the exclude lists for any dynamic pages that should not be cached.
How do I clear the LiteSpeed Cache after updating my site?
You can purge the entire cache by clicking the LiteSpeed Cache icon in the WordPress admin toolbar and selecting Purge All. Alternatively, use the WP-CLI command wp litespeed-purge all in your terminal. The plugin also purges relevant cached pages automatically when you update a post, page, or widget — so in most cases manual purging is only needed after theme or plugin updates.
Will LiteSpeed Cache improve my Google PageSpeed score?
In most cases, yes — significantly. By enabling full-page caching, minifying CSS/JS, deferring JavaScript, lazy loading images, and serving WebP images, LiteSpeed Cache addresses the majority of recommendations that Google PageSpeed Insights and Core Web Vitals audits flag. Sites that score in the 30–50 range before optimization commonly reach 85–95 after properly configuring LiteSpeed Cache.
Optimizing WordPress performance can feel complex, but tools are making it easier every day. WP AI Agent is one such tool — it lets you manage, configure, and troubleshoot your WordPress site, including tasks like clearing your LiteSpeed Cache or adjusting plugin settings, simply by chatting in plain English. If you want a faster way to maintain a high-performance WordPress site without diving deep into settings panels, WP AI Agent is worth exploring.