Speed up WordPress with LiteSpeed Cache
Turn on the LiteSpeed Cache plugin on HyperDC hosting, check that pages are served from the cache, purge it safely and fix the usual caching problems.
- Beginner
- 15 min read
- Updated
On this page
HyperDC hosting serves your site with the LiteSpeed web server, so the free LiteSpeed Cache plugin can store finished pages and send them straight to visitors. This guide shows how to turn it on, check that it works and keep it from showing outdated pages.
Before you start
- A WordPress site on HyperDC hosting; see WordPress hosting: get started.
- An administrator account for the WordPress dashboard.
- A fresh backup of the site, as with any plugin change; see back up and restore your hosting account.
Step 1: Install and turn on LiteSpeed Cache
- Turn off any other full-page cache plugin first. Two page caches conflict.
- In the dashboard, open Plugins › Add New, search for LiteSpeed Cache, select Install Now and then Activate. If it is already in the list of plugins, just activate it.
- Open LiteSpeed Cache › Cache. On the Cache tab, set Enable Cache to ON and save.
Step 2: Check that pages come from the cache
- Open your site in a private browser window, where you are not signed in.
- Open the developer tools (F12), then the Network tab, and reload the page.
- Click the first entry (the page itself) and look at the response headers.
X-LiteSpeed-Cache | Meaning |
|---|---|
miss | The page was not in the cache yet; it is stored now for the next visit |
hit | The page came from the cache |
| missing | The cache is not working; check that the plugin is active and Enable Cache is ON |
Verify: reload once more; the header changes from miss to hit.
Step 3: Purge the cache when needed
LiteSpeed Cache purges pages automatically when you edit them. Purge by hand after bigger changes, such as a new theme or menu:
- In the admin bar, open the LiteSpeed menu and choose a purge option.
- Or open LiteSpeed Cache › Toolbox, the Purge tab, and click Purge All.
Step 4: Optimise carefully
Under LiteSpeed Cache › Page Optimization, the plugin can also combine and minify CSS and JavaScript. These options can break layouts or scripts on some themes. Turn on one option, purge all, and check the site in a private window before you change the next one.
Troubleshooting
The header never shows hit. You are testing while signed in, another page cache plugin is active, or the page sends a no-cache header (pages excluded on purpose show X-LiteSpeed-Cache-Control: no-cache). Test in a private window and turn off other page caches.
Visitors still see an old page. Purge all from the admin bar or the Toolbox. For WooCommerce shops, check the settings on the WooCommerce tab of LiteSpeed Cache › Cache; the tab appears when WooCommerce is active.
The site breaks after turning on CSS or JavaScript optimisation. Under LiteSpeed Cache › Page Optimization, turn the last changed option off again, purge all and change one option at a time.
Next steps
- Errors after a plugin change: fix WordPress errors.
- 508 or resource limit errors: fix 500, 403, 404 and 508 errors.
Frequently asked questions
Can I use another cache plugin at the same time?
Not another full-page cache. LiteSpeed recommends turning off other page cache plugins before you activate LiteSpeed Cache.
Does it work on web hosting plans as well?
Yes. Sites on our web hosting and WordPress hosting are served by the LiteSpeed web server, which the plugin works with.
My change does not show on the site. Why?
The old page is still in the cache. Purge it from the LiteSpeed menu in the admin bar, or with Purge All under LiteSpeed Cache › Toolbox.
Should I turn on every optimisation option?
No. The page cache alone gives the biggest gain. Change CSS and JavaScript optimisation options one at a time and check the site after each change.