GuideLiteSpeed Cache settings for WordPress at MariHost
Last updated: 29 October 2026
Every new WordPress website at MariHost comes with the LiteSpeed Cache plugin, already switched on. Our servers run LiteSpeed's web server, so the plugin can keep ready-made copies of your pages and serve them without running WordPress each time. This guide shows what's on already, the two settings we recommend adding (opcode caching and Redis), how to clear the cache, and how to add a CDN. It takes about 10 minutes.
What's on already
On a new WordPress website, the page cache is on from the start: in WordPress, LiteSpeed Cache → Cache shows Enable Cache set to ON. The first visitor to a page waits for WordPress to build it, and the next ones get the cached copy, which is much faster. When you edit a post or page, the plugin clears its copy, so visitors see your change.
Installed WordPress yourself, or moved your site to us? Check that the LiteSpeed Cache plugin is installed and active under Plugins.
Turn on opcode caching
WordPress is written in PHP, and each page it builds runs hundreds of PHP files. Opcode caching keeps those files ready to run in the server's memory, so PHP doesn't read and prepare them again on every visit. Every page WordPress builds gets faster, your dashboard included. It's off on new websites, and turning it on takes one switch.
Sign in to your client area at billing.marihost.com, open your hosting plan and click Login to Control Panel. Open Websites in the left sidebar and choose your website. Open Advanced in the top menu and choose Optimization.
Turn the Opcode caching switch on. A notice says "'Opcode caching' enabled". Nothing else needs changing, in the control panel or in WordPress. Do the same for each of your WordPress websites. For screenshots, and what opcode caching does, see OPcache and Redis.
Turn on the Redis object cache
The page cache helps visitors who aren't logged in. Some pages can't be cached, such as your shop's cart and checkout, a members' area or the WordPress dashboard, and WordPress builds them every time, asking its database the same questions again and again. Redis keeps the answers in memory, so those pages load faster too. It's included with your hosting, for each website.
1. Turn on Redis in the control panel
In the control panel, open Websites in the left sidebar and choose your website. Open Advanced in the top menu and choose Developer tools, then click Redis on the left.
Turn the Redis switch on. A notice says "Redis enabled", and Connection details appear: the address 127.0.0.1:6379, with no password. Redis runs inside your website's own space on the server, so only your website can reach it.
2. Connect LiteSpeed Cache to Redis
Log in to WordPress (the Admin button on your website's page in the control panel signs you straight in). Go to LiteSpeed Cache → Cache and open the Object tab. Set:
- Object Cache: ON
- Method: Redis
- Host: 127.0.0.1
- Port: 6379
Leave Username and Password empty, Redis Database ID at 0, and the rest as it is. Click Save Changes.
3. Check the connection
Back on the Object tab, Status should say Redis Extension: Enabled and Connection Test: Passed. That's it: WordPress now keeps its database answers in Redis.
Turn Redis on for each website you want it on, and connect each website's LiteSpeed Cache the same way. For screenshots, and how to give Redis a memory limit, see OPcache and Redis. A staging copy is a website of its own: it doesn't need Redis unless you're testing speed on it.
Clear the cache
LiteSpeed Cache clears pages by itself when you change them. Clear everything yourself when your whole site changes at once, for example after you:
- change your theme, your site's design or its menus
- update a page builder or a plugin that changes how pages look
- restore a backup or push a staging copy live
In WordPress, go to LiteSpeed Cache → Toolbox, and on the Purge tab click Purge All. Then check your site in a private browser window, where you're not logged in.
Add a CDN
A CDN (content delivery network) keeps copies of your images, CSS and JavaScript on servers around the world, so visitors far from our servers in Singapore get them faster. You don't need one for a site whose visitors are mostly in Malaysia and nearby. If you want one, here are the two we recommend. They also work together: MariCDN serves your files, and Cloudflare sits in front of your domain.
MariCDN, free to start
Every new WordPress website at MariHost also comes with the MariCDN by MariHost plugin, and MariCDN's free plan includes 3 GB of traffic a month. Our guide to MariCDN shows how to connect it. The MariCDN plugin does the CDN work itself, so leave LiteSpeed Cache's own CDN setting off: under LiteSpeed Cache → CDN, on the Other Static CDN tab, Use CDN Mapping stays OFF.
Cloudflare
If your domain uses Cloudflare, connect LiteSpeed Cache to it, so that clearing the cache in WordPress clears Cloudflare's copies too. See Use Cloudflare with your website to set Cloudflare up first.
- Make an API token in Cloudflare. An API token is a key that lets the plugin do a few things in your Cloudflare account. In Cloudflare, go to My Profile → API Tokens and click Create Token. Choose the WordPress template. Under the zone resources, choose your domain only, instead of all zones. Click Continue to summary, then Create Token, and copy the token: Cloudflare shows it only once.
- Add it to LiteSpeed Cache. In WordPress, go to LiteSpeed Cache → CDN and open the Cloudflare tab. Set Cloudflare API to ON, paste the token into Global API Key / API Token, and type your domain into Domain. You can leave Email Address empty when you use a token.
- Clear Cloudflare with LiteSpeed. Set Clear Cloudflare cache to ON, so Purge All clears Cloudflare's cache too. Click Save Changes.
Once it's connected, the Cloudflare section on that tab shows your Cloudflare Domain and Cloudflare Zone. It also has Purge Everything, to clear only Cloudflare's cache, and Development Mode, which stops Cloudflare caching for three hours while you work on your design.
Keep the token private, like a password. If you ever share your WordPress login, or no longer use the plugin, delete the token in Cloudflare.
LiteSpeed Cache settings to leave alone
- Don't add another caching plugin, such as WP Rocket, W3 Total Cache or WP Super Cache. Two page caches get in each other's way, and LiteSpeed Cache already does the job on our servers.
- Go carefully with Page Optimization. Its settings shrink and combine your CSS and JavaScript. They can make a site faster, but they can also break a layout, a menu or a form. Change one setting at a time, click Purge All, and check your site on a computer and a phone before the next.
- You don't need QUIC.cloud. It's LiteSpeed's own CDN and online services: optional, and not needed for anything in this guide.
If something's not right
Connection Test says Failed. Check that the Redis switch is on in Developer tools, and that Host is 127.0.0.1 and Port is 6379, with no spaces. Then save again.
Your change doesn't show on the site. Click Purge All, then check in a private window. If you use Cloudflare without connecting it to LiteSpeed Cache, clear its cache too: in Cloudflare, go to Caching → Configuration and, under Purge Cache, click Purge Everything.
The dashboard shows old information after a change. Turn off Cache WP-Admin on the Object tab, and save.
Your site looks broken after changing a setting. Undo the last change and click Purge All. If you can't get into WordPress, open a ticket and we'll help you switch it back.
Next steps
Want your site faster for visitors abroad? Connect MariCDN, or use Cloudflare with your website. Making a big change? Back up your website first.
Rather we looked after it?
WordPress Care keeps your site updated, backed up, monitored and working, done for you every month.
Keep reading
Use Cloudflare with your website
Move your DNS to Cloudflare's free plan without breaking your email, and set HTTPS up the right way.
Read the guideIncrease the upload size and PHP limits
Which PHP limit causes which WordPress error, and how to raise it yourself.
Read the guideBack up and restore your website
Make a backup before a big change, and put back your whole site or only some files, without a ticket.
Read the guide