If you’re not using a LiteSpeed host yet, NameHero’s Turbo Cloud plan has 3 CPU cores, 3GB RAM, and faster NVMe storage for $8/month which is a much better value than Hostinger/A2.
There’s no reason you should be using any other plugin since LiteSpeed Cache has excellent reviews, extensive settings, and uses faster server-level caching. You should also be trying out QUIC.cloud CDN which is free and specifically built to work on top of LiteSpeed with 70+ PoPs.
Head to the quick settings if you ‘re looking for an easy setup, otherwise I’ll walk you through nearly every part of the LiteSpeed Cache settings, from Page Optimization to QUIC.cloud CDN.
- ON – enable.
- OFF – disable.
- TEST – test your own results.
- CONSUME RESOURCES – indicates the setting may consume more server resources which can lead to 5xx errors + CPU overages on shared hosting and less powerful servers.
1. Quick Settings
For a quick setup, leave all the LiteSpeed Cache settings as-is and only change the following. This setup should be fine for most WordPress sites so you don’t have to read this entire guide.
- General settings → request domain key.
- Link to QUIC.cloud after enabling QUIC.cloud CDN.
- General settings → guest mode → On.
- General settings → enter your server’s IP address.
- Cache → disable cache logged-in users + commenters.
- Cache → enable cache mobile if you’re using guest mode.
- Cache → object → Enable memcached or redis (I like redis).
- Cache → object → disabled cache wp-admin (you can test this).
- Activate redis or memcached extension in cPanel (see instructions).
- Cache → browser → browser cache → On.
- CDN → QUIC.cloud CDN → On.
- Sign up for QUIC.cloud and login to dashboard.
- QUIC.cloud dashboard → CDN → enable CDN.
- Use CNAME record for setting up QUIC.cloud.
- Copy address provided by QUIC.cloud.
- Login to cPanel → Zone Editor → Manage.
- Change www domain record to QUIC.cloud address.
- Enable static cache + QUIC Backend in QUIC.cloud.
- Test QUIC.cloud to make sure it’s working and test results.
- Image optimization summary → do this after configuring settings.
- Image optimization settings → auto request cron → On.
- Image optimization settings → optimize losslessly → On.
- Image optimization settings → preserve EXIF/XMP data → Off.
- Image optimization settings → image WebP replacement → On.
- Image optimization settings → WebP for extra srcset → On.
- Page optimization → minify HTML, CSS, JS → On.
- Page optimization → load CSS asynchronously → test.
- Page optimization → load JS deferred → deferred (test).
- Page optimization → DNS prefetch → prefetch third-party domains.
- Page optimization → DNS prefetch control → On.
- Page optimization → lazy load images → On.
- Page optimization → lazy load iframes → On.
- Page optimization → add missing sizes → On.
- Page optimization → inline lazy load images library → On.
- Page optimization → gravatar cache + cron → On.
- Database → clean your database once in a while.
- Database → revisions max number → 10 is fine.
- Toolbox → heartbeat → enable all, then 120, 0, 60 respectively.
LiteSpeed’s Dashboard shows the status of optimized images, CDN usage, CSS, etc. Measuring your PageSpeed scores here is more accurate than third-party browser tools such as GTmetrix.
- Automatically Upgrade – enable – likely maintained well enough to do this.
- Domain Key – request a domain key and add it here, then link to QUIC.cloud.
- Guest Mode – enable – significantly improves load time for first time visitors by saving time reading cookies, looking for cache varies, and processing ESI. You can read more about Guest Mode + Guest Optimization here, but it has great feedback in Facebook Groups. Consumes resources if crawling is enabled. Doesn’t work with Cloudflare APO.
- Guest Optimization – enable – aggressive page/image optimization for first time visits.
- Server IP – use the tool in LiteSpeed Cache to paste your server’s IP address.
- Notifications – enable – you want notifications from LiteSpeed (i.e. new releases).
- Enable Cache – On.
- Cache Logged-in Users – Off – only enable if you run a membership website or need caching in the admin for users logging into your site, otherwise it consumes resources.
- Cache Commenters – Off – creates a separate cache for people who left a comment which is still pending, but also consumes resources if your blog gets lots of comments.
- Cache Rest API – On – used for many themes, plugins, and the WordPress Block Editor.
- Cache Login Page – On – saves server resources since the login page is a common target. Don’t change the login URL since LiteSpeed + QUIC.cloud optimize the default login page.
- Cache favicon.ico – On – caches favicon (the small logo image shown in the browser tab).
- Cache Mobile – Depends – only enable if you serve different content on mobile/desktop, or use AMP, CCSS, UCSS, or Guest Mode and Guest Optimization (consumes resources). Since I recommend Guest Mode + Guest Optimization be turned on, this would also be on.
- Cache URIs – not necessary for most websites since the “cache logged-in users” setting handles private cached URIs, and no pages on your site generally need to be force cached.
- Drop Query String – marketing campaigns and tracking URLs often contain query strings where caching is ignored. The default list is usually fine, but if you have others, add them.
- Cache TTL – default settings are usually fine. Cache TTL is the amount of time LiteSpeed Cache keeps a cached file. Once it expires, it will create a new one. A shorter TTL is only needed if you update your site frequency and want to guarantee visitors will see the new cached version, but this will also consume more resources. A long TTL will save resources, but the cache won’t be refreshed as frequently, so visitors might not see the new content.
- Purge All On Upgrade – On – purges cache when WordPress core/themes/plugins are upgraded to make sure your site displays properly. LiteSpeed says to leave this on as well.
- Auto Purge Rules For Publish/Update – default settings are OK. When you publish a post, your blogroll and other content may need to update, so they should also be purged.
- Serve Stale – Off – when turned on, the most recently purged (stale) copy of the page is served if the new cached version isn’t generated yet (enabling this consumes resources).
- Schedule Purge URLs – no need to add URLs here unless you need pages purged at specific time (during low traffic), in which case you would also set a schedule purge time.
- Purge All Hooks – default settings are fine. When specific hooks are run, it will purge all. LiteSpeed says adding comment_post may be good to purge all when a comment is made.
Nothing to do here for nearly most sites. You’re already controlling the cache in other settings, so there’s usually no reason to exclude specific things from the cache unless you have a reason.
- Enable ESI – Off – controls how specific elements on your dynamic pages are cached, whether it be publicly, privately, with a custom TTL, etc. Complicates things (LiteSpeed says it’s easier for a server to return full pages without messing with this). Since ESI is off, there’s no need to change settings for admin bar, comment form, Nonces, or Vary Group.
- Object Cache – On – caches your database. I prefer Redis over memcached, but which one’s ‘best’ is debatable. To pass the connection test, enable Redis or memcached in your hosting account (only one). In cPanel, this is in Select PHP Version → Extensions, then enable the Redis or memcached extension. Save changes and recheck the connection test.
- Method – Redis if that’s the extension you enabled in your host, otherwise memcached.
- Host – leave as localhost.
- Port – leave as the default port.
- Default Object Cache Lifetime – 360s is fine.
- Username/Password – leave as-is (not needed).
- Redis Database ID – leave unless you use Redis and need a different ID.
- Global Groups – leave as-is (groups that should be cached at network level).
- Do Not Cache Groups – leave unless you want to add groups excluded in object cache.
- Persistent Connection – On – connection is kept alive and can make Memcached faster.
- Cache WP-Admin – Off – using object cache inside the admin can sometimes have a negative effect on the speed of the admin. You can test it, but I would usually leave it off.
- Store Transients – On – recommended by LiteSpeed to get server status notifications.
- Browser Cache – On – not sure why this isn’t enabled by default.
- Browser Cache TTL – 31557600 – recommended by Lighthouse to serve static assets with an efficient cache policy. This tells browsers how long the cache should be stored for.
- Login Cookie – leave as-is (only needed if you have multiple WordPress installs and need the cache to distinguish who is logged into which WordPress site, not used for a multisite).
- Improve HTTP/HTTPS Compatibility – Off – only enable if you’re using both HTTP and HTTPS and are noticing issues with the cache. You can also try forcing SSL to solve issues.
- Instant Click – On – similar to the Flying Pages plugin and WP Rocket’s link preloading. When users hover over a link, the page will download in the background so by the time they click it, the page will appear to load instantly (enabling this can consume resources).
- Use ESI for Cart – Off – if using ESI, this will turn cart information into ESI blocks so individual elements are treated differently. You can try it, but it may complicate things.
- Product Update Interval – I prefer the second option since product + category pages are only purged when the stock status changes. Less purging means a faster site, but means users may not see the new stock status + quantity. Too much purging consumes resources.
- Use Front Page TTL for the Shop Page – On – shop page will use front page TTL setting.
- Privately Cache Cart – Off – Johnny recommends leaving it off since “caching non-empty carts are a waste as potential buyers don’t hang around for too long… they can be patient.”
- QUIC.cloud CDN – On – I recommend using QUIC.cloud CDN since it was specifically built to work on top of LiteSpeed and is also free. You will need to enter your domain key in the General settings of LiteSpeed Cache before using QUIC.cloud CDN.
- User CDN Mapping – Off – QUIC.cloud CDN and Cloudflare don’t use CDN mapping.
- HTML Attribute To Replace – leave as-is since the CDN mapping setting is turned off.
- Original URLs – leave as-is unless it’s a multisite with different domains + subdomains.
- Included Directories – just the wp-content and wp-includes directories should be fine.
- Exclude Path – leave as-is unless you want to exclude specific directories from above.
- Cloudflare API – only needed if you use Cloudflare’s CDN which you’re likely not using.
Setting Up QUIC.Cloud CDN
Ryan from NameHero already made a video on setting up QUIC.cloud with LiteSpeed, but I listed the steps below as well. There’s a lot of good stuff there and I recommend watching it.
You must follow these initial steps before continuing further: activate QUIC.cloud CDN, get a domain key, sign up for QUIC.cloud, and link the domain key to QUIC.cloud.
6. Image Optimization
Configure the image optimization settings, then send an optimization request.
- Auto Request Cron – On – sends a request to optimize newly uploaded images.
- Auto Pull Cron – On – if the previous setting is turned on, this should be on too.
- Optimize Original Images – On – see LiteSpeed’s example, but likely turn this on.
- Remove Original Backups – Off – don’t remove unless you’re happy with the quality.
- Optimize Losslessly – On – I prefer lossless compression but you can try this yourself.
- Preserve EXIF/XMP Data – Off – removing EXIF data helps reduce your image sizes.
- Create WebP Versions – On – create WebP images to serve them in next-gen formats.
- Image WebP Replacement – On – enable this if you have the previous option enabled.
- WebP Attribute To Replace – leave unless you want to control which images are WebP.
- WebP For Extra srcset – On – makes sure images in custom code are served as WebP.
- WordPress Image Quality Control – 82 is good since Lighthouse tests images at 85%.
7. Page Optimization
- CSS Minify – On – removes unnecessary characters from CSS.
- CSS Combine – Off – don’t combine with HTTP/2 or large CSS files.
- Generate UCSS – Off – only use if CSS combine is turned on. Helps remove unused CSS, but heavy CSS often from themes and plugins. You can try Asset CleanUp or Perfmatters.
- UCSS Inline – Off – again, this setting should only be enabled if combine CSS is turned on.
- CSS Combine External and Inline – Off – only use with combine CSS (prevents breaking).
- CSS HTTP/2 Push – Off – pushing too many resources directly without having to receive requests can actually have a negative impact on load times, so I recommend turning it off.
- Load CSS Asynchronously – Off – you’ll likely get FOUC or layout shift issues if this is enabled, but this is something I would definitely test and see how it impacts your speed.
- CCSS Per URL – Off – disable if previous optionis off, especially if using a page builder.
- Inline CSS Async Lib – Off – CSS will be render-blocking, but you’ll avoid FOUC issues.
- Font Display Optimization – default. Setting this to Swap can also cause FOUC issues. But if you see “ensure text remains visible during webfont load” in PSI, you can try Swap.
- JS Combine – Off – don’t combine with HTTP/2 or large JS files.
- JS Combine External and Inline – Off – only enable if JS combine is enabled.
- JS HTTP/2 Push – Off – pushing too many resources can have a negative impact.
- HTML Minify – On – strips unnecessary characters from HTML.
- DNS Prefetch – prefetch third-party domains loading on your site (if you’re not sure which ones to add, see this list or open up your Lighthouse report or Chrome Dev Tools). Google Fonts, Tag Manager, Analytics, AdSense, and Facebook are some common ones.
- DNS Prefetch Control – On – leave it on, but nothing to do if you added them manually.
- HTML Lazy Load Selectors – you can specify a class or ID to lazy load HTML content.
- Remove Query Strings – Off – somewhat outdated and shouldn’t impact load times.
- Load Google Fonts Asynchronously – Off – test carefully and view your GTmetrix Waterfall “fonts” tab to see the difference in your font load times. I like to keep it off.
- Remove Google Fonts – Off – only use if you’re hosting fonts locally and want to make sure any third-party fonts aren’t being loaded on your website, which they shouldn’t be.
- Remove WordPress Emoji – On – emojis aren’t good for load times, so turn this on.
- Lazy Load Images – Off – lazy load is definitely a preference. Some argue it’s terrible for UX, while others want to do it to improve their PageSpeed scores. This is really up to you.
- Basic Image Placeholder – use an image as the placeholder while your images are loading.
- Responsive Placeholder – On – it should be on if you’re using a basic image placeholder.
- Responsive Placeholder SVG – specify the SVG to be used as the responsive placeholder.
- Responsive Placeholder Color – default gray color LiteSpeed Cache uses should be fine.
- LQIP Cloud Generator – Off – a lower quality image (which is generated by QUIC.cloud) will be used as the placeholder before the higher quality image is loaded. Test it yourself.
- LQIP Quality – if the previous setting is enabled, this determines the lower quality image.
- LQIP Minimum Dimensions – 150×150 pixels is fine. This is only for when LQIP cloud generator is turned on, and LQIP will only be used when images are larger than this size.
- Generate LQIP In Background – On – LiteSpeed says turning it off slows down page load.
- Lazy Load Iframes – On – lazy loading videos, maps, and other iframes improves speed.
- Add Missing Sizes – On – adds missing image dimensions to set explicit widths + heights.
- Inline Lazy Load Images Library – On – further improves speed when lazy load is enabled.
If you have lazy load turned on, these settings exclude images from lazy load which you’ll want to do for all above the fold images (it would be counterintuitive to lazy load these). It’s probably easiest to add these images (i.e. logo, background images, etc) in the “lazy load image excludes” field. You can also use the settings to exclude images by their class name, parent class name, etc.
- Gravatar Cache – On – great especially if you have lots of comments which include Gravatars, but I recommend using a local avatar plugin to prevent third-party requests.
- Gravatar Cache Cron – On – you want it enabled if the previous setting is enabled.
- Gravatar Cache TTL – the default setting of 604800 seconds (1 week) should be fine.
Most settings are if you want to exclude specific things from being optimized (CSS, JS, URLs, deferred JS, Guest Mode JS, and roles). You usually only need to do this if a specific setting breaks your site. For example, if you minify or combine CSS/JS and it breaks your site, find the problematic file (in your source code), then add them. Same concept for most other settings.
In the Manage tab, you probably want to delete everything except post revisions and auto drafts, which are backups of posts that you may need in the future. You can also optimize tables.
DB Optimization Settings
- Revisions Max Number – I use 10 so I have backups, but doesn’t cause database bloat.
- Revisions Max Age – 0 makes sense to me (they will never be deleted). Sometimes I don’t update a post for a very long time, so automatically deleting the backups isn’t a good idea.
This crawls your site for pages with expired cache and refreshes them. It consumes resources (a lot of them) which is why it’s controlled at a server level and usually not allowed by most hosts, especially shared hosting (it’s usually only if you manage your own server). So, you usually don’t need to do anything. If you do manage your own server, you’ll want to enable the crawler and see WP Johnny’s instructions (in summary, he recommends enabling the crawler in the General settings, submitting your sitemap in Sitemap settings, then leaving all other settings as default).
Most Toolbox settings are explanatory (purging, import/export, edit .htaccess, reports, debug, logs, beta test, etc). So I’ll just cover the heartbeat settings which control WordPress heartbeat.
You usually want to limit heartbeat because it consumes resources. But, you usually don’t want to disable it in the frontend/editor because you usually need it there for AJAX functions, autosaves, etc. So while you shouldn’t completely disable it in some areas, you can still limit it.
- Frontend Heartbeat Control – On – controls heartbeat on the frontend.
- Frontend Heartbeat TTL – 120 – doubling this will save server resources.
- Backend Heartbeat Control – On – control heartbeat on the backend.
- Backend Heartbeat TTL – 0 – you usually don’t need the heartbeat here.
- Editor Heartbeat – On – controls things such as your autosave frequency.
- Editor Heartbeat TTL – 60 – 15 seconds is too frequent, 60 saves resources.
Did I Miss Anything?
I’m always looking to improve my tutorials and will listen to any suggestions you have in the comments. Otherwise if you liked my LiteSpeed Cache guide, I would appreciate you sharing it!
If you’re using Divi or Oxygen Builder, here are other people’s recommended settings from Facebook Group. I can’t say I recommend all them, but apparently it worked in their situation.