WordPress builds each page on demand: it runs PHP, queries the database and assembles the HTML every time someone visits. Caching saves a finished copy of the page and serves that instead, which is dramatically less work for the server.
If your site runs on the LiteSpeed web server the free LiteSpeed Cache plugin (often called LSCache) plugs straight into a cache built into the server itself. This guide shows you how to set it up without breaking anything.
Why LiteSpeed Cache is different
Most caching plugins work inside WordPress, using PHP to save and serve cached files. LiteSpeed Cache works with the web server: cached pages are served by LiteSpeed directly, before WordPress even loads. That's why it's usually faster than PHP-based caching, and it understands WordPress well enough to clear the right pages when you update content.
Important: server-level page caching only works when your site actually runs on LiteSpeed. Some optimization features in the plugin work anywhere, but the main page cache needs the LiteSpeed server. If you're not sure what's running your site, read LiteSpeed, Apache and Nginx: the differences.
Before you start
- Take a backup. Changing optimization settings can occasionally break a layout. See backing up your website in cPanel and DirectAdmin.
- Remove other caching plugins. Running two page caches at once causes conflicts. Deactivate and delete any other caching plugin first.
- Measure your current speed. Run a test so you can compare later. See how to test your website speed.
Step 1: Install the plugin
In WordPress, go to Plugins > Add New, search for LiteSpeed Cache, then click Install Now and Activate. A new LiteSpeed Cache menu appears in the sidebar.
Step 2: Turn on page caching
Go to LiteSpeed Cache > Cache. On the Cache tab, make sure Enable Cache is On. The defaults here are sensible for most sites:
- Cache Logged-in Users: leave Off for most sites, especially stores and membership sites.
- Cache Commenters: on is fine.
- Cache REST API: on is fine for most sites.
- Cache Mobile: turn on only if your theme serves different HTML to phones. Most modern responsive themes don't need it.
Save, then visit your site in a private browser window. The first visit builds the cache, and later visits are served from it.
Step 3: Check that caching works
Open your site in a private window, then open your browser's developer tools (F12), go to the Network tab, reload, and click the first request (your page). In the response headers, look for x-litespeed-cache: hit. If you see miss, reload again. The first request builds the cache.
Step 4: Purge settings
Go to LiteSpeed Cache > Cache > Purge. The defaults automatically clear the right pages when you publish or update a post. You can clear everything manually at any time from the LiteSpeed icon in the WordPress admin bar, using Purge All.
Step 5: Page optimization (go slowly)
The Page Optimization section can minify and combine CSS and JavaScript, defer scripts and lazy-load images. These can help a lot, but they're also where layouts break.
Turn options on one at a time, and check your site after each change:
- CSS Minify: usually safe.
- JS Minify: usually safe.
- Lazy Load Images (under Media): usually safe, and a good win.
- Load JS Deferred: a bigger win, but more likely to break sliders, menus or forms. Test carefully.
- CSS Combine / JS Combine: less important on modern HTTP/2 and HTTP/3 connections. Try them, but skip them if anything looks off.
If something breaks, turn the last option off and purge the cache.
Step 6: Image optimization
LiteSpeed Cache can optimize images and create WebP versions through an online service. It's useful if you have lots of existing images. Either way, upload images at a sensible size in the first place. See how to optimize images for the web.
Step 7: Database cleanup
Under LiteSpeed Cache > Database, you can clean up post revisions, spam comments and expired transients. Take a backup first, then run the cleanup occasionally. It keeps the database lean.
Stores and membership sites
For WooCommerce or any site with logins:
- Keep Cache Logged-in Users off.
- The plugin automatically avoids caching cart, checkout and account pages, and understands WooCommerce. Still, test the full checkout flow after setup.
- Never cache pages that show personal information to the wrong visitor. If in doubt, exclude the page under Cache > Excludes.
Measure the difference
Run the same speed test you ran before you started. Compare:
- Time to First Byte (TTFB): usually improves the most with page caching.
- Largest Contentful Paint (LCP): improves with caching, image optimization and deferred scripts.
Real results depend on your theme, plugins and content, so judge by your own before-and-after numbers. Read Core Web Vitals explained for what each number means.
Troubleshooting
- Changes don't show: purge the cache from the admin bar, and clear your browser cache.
- A layout broke after an optimization setting: turn the last setting off and purge.
- The header shows no LiteSpeed cache value: make sure the plugin is active and caching is on. If your site isn't on a LiteSpeed server, the page cache can't run.
- Logged-in content shows to logged-out users: turn off logged-in caching and purge.
The bottom line
On a LiteSpeed server, LiteSpeed Cache is one of the easiest and most effective speed upgrades for WordPress. Turn on page caching first, add optimizations one at a time, and measure as you go.