LiteSpeed Cache for WordPress: the first settings

The server your site runs on uses LiteSpeed Enterprise, and the LiteSpeed Cache plugin is the piece of WordPress that talks to it. With page caching on, a visitor asking for a page that was already requested gets a ready-made copy, instead of PHP and the database building it all over again. This article covers only the first settings: the few worth switching on now, and the ones you leave alone until a measurement says otherwise.

Before you install

1 One page cache at a time. If another caching plugin (from a different author) is already installed, deactivate it first. Two of them doing the same job give you stale pages and errors that are hard to explain.
2 Take a backup. Files and database, as in making and keeping your own backup. If the site matters, rehearse on a test site first.

The first settings, in order

1 Install and activate. In WordPress: Plugins, Add New, search for “LiteSpeed Cache” (author: LiteSpeed Technologies), Install, Activate. A LiteSpeed Cache menu appears in the sidebar.
2 Switch on page caching. Under LiteSpeed Cache, the Cache tab, set “Enable Cache” to On and save. Leave the logged-in-user and commenter options as they come, so that anyone inside the dashboard always sees the live version.
3 Switch on browser caching. On the same Cache tab there is a “Browser” section: set “Browser Cache” to On. It tells the visitor’s browser to keep images, CSS and JavaScript. The details are in browser caching with .htaccess.
4 Leave object caching off. That cache needs a Redis or Memcached server behind it, and there is none on shared hosting. The PHP extensions show up in the list, but without a server they do nothing. Page caching is a different thing, and that one exists.
5 Purge everything and check. In the WordPress top bar, LiteSpeed Cache menu, “Purge All”. Then open the site in a private window, twice in a row, and look at the response headers (in the browser: F12, Network tab, click the first request). You should see a x-litespeed-cache header, and on the second visit its value should be hit.

What each group of options does

Group What it does What to do now
Cache (pages) Keeps a ready copy of each page for visitors. Switch on.
TTL How long a copy is good for before it is rebuilt. Keep the value it ships with. Change it only if your content moves a lot during the day.
Purge When copies are thrown away. The plugin clears a page when you edit or publish it. Leave it.
Browser Tells the browser to keep static files. Switch on.
Object Object cache (Redis/Memcached). Leave off: there is no server.
Page Optimization Touches CSS, JavaScript and images (minify, combine, defer). Leave for later, one option at a time.
Image Optimization Asks an outside LiteSpeed service (QUIC.cloud) to optimise your images. Optional. See image optimisation and WebP.
CDN Connects the plugin to a content delivery network. Only if you already have one of your own, such as Cloudflare.
The “Page Optimization” options are the ones that break sites. Minifying and combining CSS and JavaScript, deferring scripts and generating critical CSS all rewrite files that belong to your theme and to other plugins. Switch on one at a time, run “Purge All”, and walk through the whole site: logged in and logged out, on a phone, and with the contact form actually sending. If something breaks, switch that option off and move to the next. On a shop, place a test order to confirm the cart and checkout are not cached: the plugin normally excludes them, but the order is the proof.
Measure before and after, with the same tool. A change you did not measure is an opinion. See how to measure your site speed, and for the finer rules cache rules that do not hide the dashboard.

Switched caching on and nothing changed, or an old page will not go away? Tell us the address and we will look at what the server returns.

Open a support ticket

SEE ALSO

Browser caching with .htaccess

Clearing the cache: the browser’s, the computer’s, and the site’s

Measuring your site speed

WordPress hosting

RECOMMENDED PRODUCT

WordPress hosting

One-click install, updates handled, and speed that holds up. from £5.28/mo (3-year plan, with coupon)

See plans
  • 0 Users Found This Useful
Was this answer helpful?