WordPress

Configure the LiteSpeed Cache plugin for WordPress

Set up the LiteSpeed Cache plugin on MdmHost: enable page caching, browser cache, object cache, image optimisation and purge rules without breaking your site.

IntermediatecPanel hosting3 min read

Because MdmHost runs LiteSpeed Web Server, the free LiteSpeed Cache (LSCache) plugin can store full pages at server level. This is faster than PHP-based caching plugins and needs very little configuration. This guide explains the settings that matter.

Before you start

  • WordPress running on an MdmHost cPanel account.
  • No other full-page caching plugin active.
  • A backup, so you can roll back if an optimisation option breaks layout.

Install and enable the cache

  1. In WordPress go to Plugins → Add New, search LiteSpeed Cache, click Install Now and Activate.
  2. Open LiteSpeed Cache → Cache → Cache tab and confirm Enable Cache is ON.
  3. Leave Cache Logged-in Users off unless you understand private caching, and keep Cache Commenters and Cache REST API on.
  4. Click Save Changes.

Check that caching works

Open your site in a private window, press F12, go to the Network tab and reload. Click the main document and look at the response headers. You should see x-litespeed-cache: hit on the second load. miss on the first load is normal.

AreaSettingSuggested value
Cache → TTLDefault Public Cache TTL604800 (one week)
Cache → BrowserBrowser CacheON
Cache → PurgePurge All On UpgradeON
Page Optimization → MediaLazy Load ImagesON
Page Optimization → CSSCSS MinifyON, test
Page Optimization → JSJS MinifyON, test

Object cache

Object caching stores database query results in memory. Under LiteSpeed Cache → Cache → Object the plugin tests whether Redis or Memcached is available. If the status shows a connection test as Passed, enable it. If not, leave it off: page caching gives the biggest gain anyway.

Image optimisation

  1. Go to LiteSpeed Cache → General and request a free domain key (QUIC.cloud) if prompted.
  2. Open Image Optimization → Image Optimization Summary and click Send Optimization Request.
  3. Enable Image WebP Replacement in the settings tab once images are processed.

Purging the cache

LSCache purges related pages automatically when you edit a post. After theme changes or CSS edits, use the LiteSpeed icon in the admin bar and choose Purge All. For WooCommerce stores the plugin already excludes cart, checkout and account pages.

Troubleshooting

  • Layout broken after enabling optimisation: turn off CSS/JS combine first, then the defer options, and purge all.
  • Header always shows miss: a plugin sends no-cache headers or sets cookies on every page; check under Toolbox → Debug Settings.
  • Visitors see old content: purge all, and make sure Cloudflare or another CDN is not caching HTML separately.
  • Logged-out visitors see a logged-in toolbar or someone else's cart: a plugin caches private data; disable Cache Logged-in Users and exclude the affected URI under Cache → Excludes.

Exclude pages from the cache

Some pages must always be generated fresh, for example a membership dashboard, a booking calendar showing live availability or a page that prints the visitor's IP. Add their paths under LiteSpeed Cache → Cache → Excludes → Do Not Cache URIs, one per line, such as /my-account/. You can also exclude by cookie or query string, which is useful for A/B testing tools.

Crawler and cache warm-up

The crawler under LiteSpeed Cache → Crawler visits your pages in the background so the first real visitor gets a cached copy. On shared hosting keep it off unless the site has many pages and long TTLs, because crawling uses your account's CPU allowance. A sitemap-based crawl once a day is usually enough.

Export your settings

When you are happy with the configuration, export it under LiteSpeed Cache → Toolbox → Import / Export. You can import the same file into your other sites or restore it after a reinstall.

Next steps

Was this guide helpful?

Still stuck?

Ask MdmHost AI for a quick answer, or open a ticket and our team will take a look. We are here 24/7.