LiteSpeed Cache is included with all of our cPanel hosting plans. It is a very high performance caching system which will improve your website loading times dramatically.
Follow this guide to install and set up your WordPress website with LiteSpeed.
No Cache
WordPress can take a long time to render web pages. If you have a lot of plugins or shortcodes on your pages, WordPress has to generate the page each time someone views it. A cache will generate the page once and then show this pre-rendered page to visitors. This takes the workload off your server and WordPress. Your site becomes faster because visitors are viewing the prebuilt page instead of waiting for WordPress to build it each time.
Pages that are dynamic, like a shopping cart, are partially cached with only the parts that change needed to be built each time. Other parts of the page (header, footer, menus etc.) are all still cached so your website still benefits from the cache system.
As a test, make sure that you have no cache plugins installed in WordPress and run a speed test. We like to use Pingdom as it as the option of Testing from Sydney.
Enter your full webpage address including https and select Sydney from the Test drop down:
Click the Start Test button and after a few seconds you'll receive your score:
Depending on your website configuration your Performance Grade may differ. Keep the tab open in your browser so we can come back later and run the test again once we have set up LiteSpeed.
Installing LiteSpeed
You can install the LiteSpeed plugin in WordPress by following these steps:
- Login to WordPress on your website
- In the left hand menu, scroll down to Plugins and click on Add New Plugin
- In the Search Plugins box type in LiteSpeed
- From the search results, find the LiteSpeed Cache plugin and click on Install Now:
- Once the installation has finished, click on Activate:
- On your left hand menu in WordPress you will now see LiteSpeed Cache, click on Presets:
- For most websites the Advanced preset, is the recommended option. Click on Apply Preset:
- In an InPrivate/InCognito browser open your home page. The first time you view the page, the cache version will be generated. Wait for the page to completely load.
- Now refresh your page and you should see it loads much faster. Let's test this via Pingdom, click the Start Test button again and compare the results:
We've reduced our home page loading speed from 2.08 seconds to just a quarter of a second!
It's a good idea to completely test your website when installing a cache to make sure everything is working as it should.
Troubleshooting
Gzip error in Pingdom
In Pingdom you may see this error:
gzip is a compression technology but LiteSpeed uses a faster system called brotli. You can ignore this warning.
Webpage changes are not showing
If you are editing your web content and it's not updating when you view the page, this is because the cache is keeping the old version. You will need to clear the cache for the page.
In the WordPress toolbar at the top of the page, click the LiteSpeed logo:
Then from the menu, select Purge this page.
The page will reload and show your changes.
Advanced Performance Options
You can squeeze even more performance out of LiteSpeed by digging into the settings further. The following topics are all optional and you should test that they don't break your site. If they do, they can be easily reversed.
Object Caching
Object caching will store database queries in the cache instead of asking the database for the data. WordPress uses a database to store all of your data and webpages. By caching the data, you can increase your site speed even further.
- From the LiteSpeed Cache menu in WordPress, click on Cache
- The click on the Object tab:
- Set the Object Cache to On:
- Make sure the Method is set to Memcached:
- Leave all other settings as they are.
- Click on the Save Changes button
Crawler
For a page to load quickly, it must already exist in the cache. The cached version is only created when someone visits the page for the first time. The LiteSpeed Cache Crawler will work through all of the pages on your site in the background and will generate the cache versions automatically.
Note: Shared hosting accounts do no include the Crawler. You will need to upgrade your hosting to a VPS to use this feature.