Best LiteSpeed Cache Settings [2024] for Unmatched Website Performance — Score a 100 on CWV

Updated on

Are you searching for the best LiteSpeed cache settings? If so, keep reading this article. I will show you how to optimize the LiteSpeed cache for unparalleled website performance.

Since Google uses website speed as a ranking factor, whether you run a personal blog or WooCommerce store, you should ensure your website is optimized for speed.

The LiteSpeed Cache plugin compliments the LiteSpeed Web Server to harness the LScache capabilities, making this combination a class apart.

However, merely installing and activating the LiteSpeed caching plugin will not significantly enhance your website’s speed. You need the ideal LiteSpeed Cache plugin configuration setup to make the most of it.

In this blog post, I will share a step-by-step guide on how to configure each LiteSpeed cache plugin setting to achieve the best results, that will enhance both your website speed and core web vitals score, and your search engine rankings will eventually improve.

Before going further into the LiteSpeed Cache settings, let’s see what the plugin offers.

LiteSpeed Cache: An Introduction

LiteSpeed Cache is a free WordPress caching plugin created by LiteSpeed Technologies. It can be downloaded from the WordPress plugin repository and offers cutting-edge optimization options.

litespeed cache
LiteSpeed Cache

More than 5 million websites use this plugin. Here are a few features of LiteSpeed that make it a unique plugin for caching:

  • LS Cache and Object Cache
  • Lazy loading
  • Static Resources (CSS and JS) optimization
  • Gravatar Cache
  • Font Display Optimization
  • DNS prefetch
  • Database cleaner and optimization
  • Cloudflare integration
  • Free QUIC.cloud CDN access
  • Separate caching for desktop and mobile users

And so on.

Besides that, LiteSpeed Cache is better than most of the competitors. Here is a quick look into the popular WordPress plugin comparisons.

LS plugin comparison
LiteSpeed plugin Comparisons

However, if you need to boost the website’s performance, consider using the LiteSpeed Cache with the best LiteSpeed web hosting services built using LiteSpeed Enterprise Web Servers.

Now you know what LiteSpeed Cache is and why you should use it. In the next section, I will move to the article’s core and explain how to perform the ideal LiteSpeed Cache settings for faster load times. 

Best LiteSpeed Cache Settings for 100% Website Performace

Best LiteSpeed Cache Settings
Best LiteSpeed Cache Settings for 100% Website Speed

The LiteSpeed Cache plugin comes with a wide range of option categorised into ten plugin settings:

  • Dashboard
  • Presets
  • General
  • Cache
  • CDN
  • Image optimization
  • Page optimization
  • Database
  • Crawler
  • Toolbox
litespeed cache settings
LiteSpeed Cache Settings

Below, I explain how to configure these options so you can have the ideal LiteSpeed Cache settings with the optimized performance and core web vitals score.

You could easily improve your website’s performance by exploring these advanced features.

Without any further ado, let’s get into the guide.

1. Dashboard

The dashboard doesn’t come with any customization options. It will show you an overview of the optimization.

dashboard LS
LiteSpeed Cache Dashboard

2. Presets

If you prefer to skip custom configurations, you can use the preset options. There are five predefined optimization presets in the LiteSpeed Cache plugin, ranging from basic optimizations to expert-level optimizations.

To apply a preset, simply click the “Apply Preset” button.

  • Essentials Preset: Suitable for all websites, good for new users, and simple sites. 
  • Basic Preset: It is one of the safest options, ideal for enthusiastic beginners, and includes image optimization and mobile cache. Requires Domain Key.
  • Advanced Preset (Recommended): This is perfect if you need comprehensive optimization with minimal conflict risk. Includes guest mode, minification, and more. Requires Domain Key.
  • Aggressive Preset: Takes optimization to the next level with additional settings like CSS & JS combine and lazy load for iframes. Requires testing and a Domain Key.
  • Extreme Preset: For experts only, maximum optimization with thorough testing is needed for some elements. Includes lazy load for images and viewport image generation. Requires Domain Key.
presets
LiteSpeed Cache Presets

If these presets do not meet your needs, keep reading to learn how to manually configure the plugin for optimal performance.

3. General

The general settings come with minimal configuration options.

  • Automatically Upgrade: Disable. Sometimes, plugin updates can cause compatibility issues, so you don’t need to enable automatic upgrades.
  • Domain Key: Custom. You should get a domain key if you need to use QUIC.cloud functions. You can request domain key from the same page for free.
  • Guest Mode: It Depends. You can pick an optimal setting according to your preferences. Enabling it will help you serve the website faster for first-time visitors.
  • Guest Optimization: It depends. If you have enabled guest mode on your website, you should also allow this option.
  • Server IP: Custom. You need to add your server’s IP address there, not the Admin IP.
  • Notifications: It depends. They are only available if you want to see the latest updates regarding the plugin. They don’t impact page speed.
general settings
General Settings

4. Cache

Next, let’s move to the main configuration—the caching configuration. On the cache page, you will see several public cache customization options.

litespeed cache settings'
LiteSpeed Cache Settings
  • Cache
  • TTL
  • Purge
  • Excludes
  • ESI
  • Object
  • Browser
  • Advanced
  • WooCommerce

Let’s take a look at each customization.

4.1 Cache

Using these cache settings will help you improve the performance of your WooCommerce store or WordPress website. Caching will improve website response time, and loading speed and will reduce the impact on CPU core usage:

  • Enable Cache: On. This plugin’s whole point is to create public cached content. If you enable this option, the plugin will start creating one. Use this option to handle static content caching.
  • Cache for Logged-In Users: Off. Logged-in users need to see every update in real-time, so turn off this feature.
  • Cache commenters: Off. You can generate a separate cache for commenters who have comments pending.
  • Cache REST API: On. You should enable this since themes, plugins, and the Gutenberg editor use the API function.
  • Cache Login Page: On. If you run a customer-centric business, you will have many visitors to the login page, so enable caching.
  • Cache PHP Resources: On. With the help of this function, you can improve the time required to load the dynamic content.
  • Cache Mobile: It depends. If enabled, the plugin will generate a separate cache for mobile users. You can enable cache mobile if you have the most mobile visitors. It will improve mobile test scores.
    • List of Mobile User Agents: You do not need to modify anything there. All the default values are acceptable.
  • Private cache URLs: It Depends. You can add strings here. URLs containing these strings will not be cached as public. Adding a private cache is an ideal setting for an online store where you do not want to cache specific URLs.
  • Force Cache URLs: It Depends. If you need to cache any URLs with specific strings, enter here. Most people won’t do this.
  • Drop Query Strings: It Depends. It will help you ignore specific query strings when caching.
cache settings
Cache Control Settings

4.2 TTL

TTL stands for “Time to Live”, and indicates how long your public pages are cached. This caching functionality is usually defined in seconds. The default cache TTL options are acceptable. You do not need to modify anything else.

cache ttl
Cache TTL

4.3 Purge

Purging the expired cache is an excellent way to keep your website updated. The default settings are fine, here are the configuration options:

  • Purge All On Upgrade: On. It clears cache entries on each upgrade. You should perform the purge when your website’s themes, plugins, or core are updated to a newer version.
  • Auto Purge Rules for Publish/Update: It depends. You do not need to modify anything, keep the default.  This clears cache entries on post/page Publish/Update.
  • Serve Stale: Off. To generate the web page dynamically, you need to turn off this function.
  • Scheduled Purge URLs: it depends. Leave it blank, unless you need to purge any URLs on a scheduled time.
  • Scheduled Purge Time: It depends. You can specify a time to complete the automatic purge, and the plugin will automatically perform the purge at that time.
  • Purge All Hooks: Off. You do not need to purge any WordPress hooks.
purge settings
Purge Settings

4.4 Excludes

You do not need to modify anything here. Leave the configurations as it is. This option allows you to choose the types of content you do not need to include in the caching process.

4.5 ESI

ESI stands for Edge Side Includes. Here is the recommended Edge Side Includes configuration:

  • Enable ESI: Off. That’s it. You don’t need to configure anything else.
ESI
ESI

4.6 Object

Next, we have the object cache settings. The LS Cache offers two object caching methods Redis and Memcached. 

Before configuring this, you need to enable Redis. Log in to your web hosting plan’s cPanel > go to the Redis Object cache settings and enable it. If you need help, get in touch with the customer support.

Redis cache is way better than Memcached in terms of caching dynamic queries. Check out the details below. 

In case, your server does not have Redis, you should use Memcached Object Cache as an alternative. 

After enabling Redis/Memcached on the server, configure the Object cache settings like this:

  • Object Cache: On. This is an excellent way to improve the performance and reduce the server load.
  • Method: Redis. Redis is faster than Memcached. So, I recommend Redis for maximum performance.
  • Host: Custom. You can get this information from your web hosting plan. Usually, it is “127.0.0.1” for Redis and “localhost” for Memcached. Use it without quotes. 
  • Port: Custom. The default port for Redis is 6379 and for Memcached is 11211. If you have any issues, contact customer support.
  • Default Object Lifetime: 360. The default value is acceptable.
  • Username and Password: Don’t change. No modifications are needed.
  • Redis Database ID: Custom. Keep it default. Only enter the specific database ID here if you use Redis on multiple sites.
  • Global groups: Don’t change. No changes are required.
  • Do Not Cache Groups: Don’t change. No changes are necessary unless you do not need to cache a specific group.
  • Persistent Connection: On. You need to enable this to optimize the object caching better.
  • Cache WP-Admin: On. You can enable this option to speed up the WordPress admin area.
  • Store Transients: Off. You must turn off this option when the WordPress admin caching is enabled.
object cache
Object Cache

4.7 Browser

You must activate it and consider it as a fallback cache to LS Cache. You should customize browser caching settings like this:

  • Browser Cache: On. Once enabled, the plugin will instruct the user’s browser to store static files locally, which will eventually reduce the repeated requests for those static files, helping to reduce the overall server load. 
  • Browser Cache TTL: 31557600. That’s one year. Google recommends one year, too. If you run an eCommerce store with WooCommerce or Easy Digital Downloads, you must set this value to 43800 = one month.
browser settings
Browser Settings

This is the ideal customization for browser caching that provides a noticeable performance boost after the first visit. 

4.8 Advanced

You can customize your cookie from advanced settings, such as compatibility. These options are mainly used by advanced users. Here are the advanced features offered by LiteSpeed Cache:

  • Login cookie: No need to change.
  • Vary cookies: No need to change.
  • Improve HTTP/HTTPS Compatibility: Off. If you have any compatibility issues, you could enable this feature. However, I recommend forcing SSL to fix most HTTPS-HTTP issues.
  • Instant Click: On. Enable this option to preload links when visitors hover over them. This is highly recommended for dynamic sites as it significantly improves user experience by making page loading feel instant.
advanced settings
Advanced Settings

4.9 WooCommerce

  • Product Update Interval: Purge product only when the stock status changes. Do not purge categories on modifications to the quantity or stock status. This is the ideal configuration for most WooCommerce stores.
  • Vary for Mini Cart: It depends. Some themes come with JS code to update the mini cart. If your theme doesn’t have this feature, you need to enable this feature.
woocommerce
WooCommerce settings

5. CDN

The LS Cache plugin offers CDN integration with QUIC.cloud or Cloudflare. All you need to do is enter the credentials of your Content Delivery Network account.

LS Cache recommends using QUIC.cloud CDN for certain LiteSpeed Cache features, such as critical CSS updating. QUIC.cloud is ranked as the 2nd best CDN worldwide and offers a free service with unlimited bandwidth and basic security. They also provide a standard plan for maximum performance and advanced security features, including brute-force attack protection, with pricing by region and a monthly free quota.

How To Setup QUIC.Cloud in LS Cache plugin

Here are the recommended CDN settings using QUIC.cloud:

  • QUIC.cloud CDN: On. Enable this option if you use QUIC.cloud CDN. 
  • Use CDN Mapping: Off. You do not need to enable this function since Cloudflare and QUIC.cloud do not use domain mapping. 
  • HTML Attribute To Replace: Don’t change. No modifications are needed.
  • Original URLs: Don’t change. You can change this option if you are on a multisite network.
  • Included Directories: Don’t change. The default options are acceptable.
  • Exclude Path: Don’t change. You can update the option to exclude specific folders from the CDN.
  • Cloudflare API: It depends. You only need to configure this option if you are using Cloudflare. It will activate the “Manager” Tab in CDN settings, where you will be able to manage your Cloudflare cache settings. Keep in mind, if you have configured the QUIC.cloud domain key, you do not need to modify anything here. 
cdn settings
CDN Settings

6. Image Optimization

To use the LiteSpeed Cache image optimization feature, you need to have a domain key from the QUIC.cloud server. Image optimization options will allow you to serve images faster and save disk space on your hosting plan.

You can rely on LiteSpeed Cache for image optimization without needing a separate image compression or optimization plugin. By compressing your images, you will improve your LCP, FCP, TBT, and Speed Index scores. 

Here’s how you can configure the settings:

  • Auto Request Cron: On. You must turn this feature on to optimize all the newly uploaded images.
  • Auto Pull Cron: On. You must also allow this option if you automatically optimize the newly uploaded images (which I enabled in the last step).
  • Optimize Original Images: On. Enabling this option would be ideal in most scenarios. If you use a web hosting plan that limits the disk space, this could help you save storage.
  • Remove Original Backups: Off. I wouldn’t recommend removing the original image backup copy. 
  • Optimize Losslessly: On. The lossless image compression method reduces the image size, and this option enables it. 
  • Preserve EXIF/XMP Data: Off. By default, images include keywords, GPS, and copyright data. You usually do not need this extra information. I recommend turning off this feature to reduce your original image size. This way, you get a clean image without any unnecessary data.
  • Image WebP Replacement: On. Use a next-gen format like WebP for serving images to your visitors. I recommend enabling WebP replacement to improve your website’s speed. This will enhance your LCP, FCP, TBT, and Speed Index scores.
  • WebP Attribute to Replace: You need to specify the attributes to replace.
  • WebP for Extra srcset: On. Once enabled, the images served via custom code will be in the WebP format.
  • WordPress Image Quality Control: 85. 85 is the WordPress default compression quality for images. So, I recommend anything between 80 and 90.
LS image optimziation
LiteSpeed Cache image optimization

Once you have configured the image optimization options, send an optimization request.

send optimization request
Send image optimization request

That’s it!

Suppose you are not using the QUIC.cloud, I would recommend using the EWWW Image Optimizer or ShortPixel Image Optimizer plugin. Read this detailed guide on how to do WordPress image optimization effectively. 

7. Page Optimization

Page optimization comes with several configuration options. With the help of these tools, you can do static file optimization, optimize media files, and so on. The main eight options available are:

page optimization options
Page Optimization Options
  • CSS Settings
  • JS Settings
  • HTML Settings
  • Media Settings
  • VPI
  • Media Excludes
  • Localization
  • Tuning

Let’s look at each option and see the best LiteSpeed Cache settings for them.

7.1 CSS Settings

You can tweak what you need to do with the CSS files on your WordPress website from the CSS settings.

Here is the configuration I recommend:

  • CSS Minify: On. Enable the CSS minify option to remove unnecessary whitespaces from your CSS code. This will optimize all your CSS files and improve your LCP, FCP, TBT, and Speed Index scores.
  • CSS Combine: It depends. Combining CSS files could break your website, so choose the CSS combine feature by testing. 
  • Generate UCSS: It depends. UCSS, or Unique CSS, is an online service from QUIC.cloud that requires a Domain Key. This performance feature generates unique CSS and removes unused CSS on each page, which can drastically improve your Core Web Vitals. If you are using QUIC.cloud, I definitely recommend this feature.
  • UCSS Inline: It depends. Turn it On if you are generating UCSS. 
  • CSS Combine External and Internal: Off. Do not combine individual CSS files (internal and external resources). This could break your website’s design. 
  • Load CSS Asynchronously: It depends. You need a domain key from QUIC.cloud. It will generate critical CSS and load the rest asynchronously, improving your Core Web Vitals. However, you may encounter layout shifts, so test it before enabling or disabling this feature.
  • CCSS Per URL: Off. Keep it off.
  • Inline CSS async Lib: On. Turning off this option will cause render-blocking CSS. 
  • Font Display Optimization: Swap. It will improve your score on PageSpeed Insights. 
CSS Settings LiteSpeed Cache
CSS Settings LiteSpeed Cache

7.2 JS Settings

Similar to the previous settings, here are the JS settings I recommend:

  • JS Minify: On. You can remove everything unwanted from the JS files by enabling this option. You can improve the LCP, INP, FCP, FID, TBT, and Speed Index scores by enabling this option.
  • JS Combine: Off. Do not enable this. This could break your website’s functions.
  • JS Combine External and Internal: Off. As we did earlier, do not enable this. There is no point in combining external JS files Google Analytics, Meta Pixel, etc.
  • Load JS Deferred: Delayed. I recommend testing this setting to see what works best for you. Delaying JS until user activity, like moving the mouse or clicking, can give you a significant performance boost. It will minimize the initial webpage load time due to reducing unused JS code resulting in improved LCP, INP, FCP, FID, TBT, and Speed Index scores.
js settings
JS Settings

7.3 HTML Settings

Here is how you can optimize the HTML with the help of LiteSpeed Cache:

  • HTML Minify: On. You should be minifying the HTML code to improve the performance. It will remove the unnecessary characters and spaces from your HTML code.
  • DNS Prefetch: It Depends. DNS-prefetch resolves domain names before resources like files or links are requested by your browser. Prefetching domains is a great way to improve your website’s speed. Add the external domains in this field and eliminate CDN URLs. Use the GTmetrix testing tool to find the external domains.
  • DNS Prefetch Control: On. Enable this feature. It automatically enables DNS prefetching for all URLs, which can enhance your page loading speed.
  • DNS Preconnect: On. Enable this feature by adding URLs to improve your website’s speed through preconnecting to third-party domains. You can use Google AdSense and Google Analytics links for this. Once enabled, your LCP, FCP, TTFB, and Speed Index scores will improve.
  • HTML Lazy Load Selectors: It depends. You can also lazy load HTML structures, like #comments and #footer. Adding these selectors to the field will delay rendering off-screen elements, which is a good practice when you have many comments.
  • Remove Query Strings: Off. You do not need to enable this feature anymore.
  • Load Google Fonts Asynchronously: Off. Disabling this is usually the ideal option for improved user experience.
  • Remove Google Fonts: Off. If you are using fonts from the Google Fonts library, keep it disabled. However, it is recommended to host fonts locally for improved performance. 
  • Remove WordPress Emoji: On. If you need to improve your page speed, turn off the emoji function.
  • Remove NoScript Tags: Off. You must turn this off to ensure the website is compatible with old browsers.
html settings
HTML Settings

7.4 Media Settings

Next, we have the media settings. To optimize the plugin for the best performance, you need to configure the media settings like this:

  • Lazy load Images: On. The lazy load option in LiteSpeed Cache is excellent, you must enable lazy loading to optimize the image serving and user experience. This feature will help you improve the LCP, FCP, TBT, and Speed Index scores.
  • Basic Image Placeholder: Off. Do not use this. It will create the Cumulative Layout Shift in above the fold area. Instead, use the next option. 
  • Responsive Placeholder: On. You should turn this feature on. This feature will show you a placeholder with the same image size, which will improve the Cumulative Layout Shift (CLS) and user experience for visitors. 
  • Responsive Placeholder SVG: Path to the file. In this option, you can specify an SVG file, which will be used as a placeholder.
  • Responsive Placeholder Color: It Depends. You can specify a color according to your needs, but the default color is fine.
  • LQIP Cloud Generator: On. This option displays Low Quality Image Placeholder (LQIP) in place of responsive image previews while the actual image is being loaded. The right QUIC.cloud domain key will generate the image.
  • LQIP Quality: 4. This is the image quality the plugin uses. Four is acceptable in this case.
  • LQIP Minimum Dimensions: 150*150. The default values are acceptable for these dimensions.
  • Generate LQIP In Background: On. Enable this to activate LQIP generation in the background, which can help improve the website frontend’s speed.
  • Lazy Load iFrames: On. You can lazy load iFrames to reduce HTTP requests. This is an ideal optimization method for embedding videos from YouTube or any other platform.
  • Add Missing Sizes: On. Enabling this option allows you to add missing image sizes to your website. You can improve the LCP, FCP, TBT, and Speed Index scores by adding image sizes.
media settings
Media Settings

7.5 VPI

VPI stands for Viewport Images. There are no advanced settings. VPI has only two options, and here is how to configure them:

  • Viewport Images: On. This function optimizes image delivery. If you have above-the-fold images, they are excluded from the lazy loading process. Since above-the-fold images can cause performance issues (CLS), this is an ideal option.
  • Viewport Images cron: On. Once you have enabled the cron option, the images will be auto-generated in the background.
vpi settings
VPI Settings

7.6 Media Excludes

If you need to exclude any media files from lazy loading, this is the right place. you only need to add the specific image attribute one per line for exclusion. Some of the images you need to exclude from lazy loading, such as Logo, Background images, Featured images, Sidebar images, etc.

  • Lazy Load Image Excludes: You can enter the file path in the field and save the plugin’s settings.
  • Lazy Load Image Class Name Excludes: Exclude specific media files from the lazy loading using image CSS class names.
  • Lazy Load Image Parent Class Name Excludes: Define the parent class name here, all the images with that parent element will be excluded from lazy loading. 
  • Lazy Load Iframe Class Name Excludes: Apart from images, you can also lazy load iFrames via the plugin’s settings. You must enter its CSS class to turn off lazy loading on an iFrame.
  • Lazy Load Iframe Parent Class Name Excludes: Add the Parent element class name.
  • Lazy Load URI Excludes: Add the URLs where you want to stop lazy loading completely. 
  • LQIP Excludes: This will exclude the Low-Quality Image Placeholder (LQIP) generation.
media excludes
Media Excludes

7.7 Localization

Configure the Localization option like this:

  • Gravatar Cache: On. Enabling this option is a great idea. If you are accepting comments from everyone, the Gravatar cache should be enabled, it will reduce server resources if there are hundreds of comments. 
  • Gravatar Cache Cron: On. Enabling this would be ideal if you had Gravatar cache enabled.
  • Gravatar cache TTL: Default. The default value is okay for this Gravatar cache option. The entire cache will be cleared according to this value.
  • Localize Resources: On. If you need to localize the external JS files, you should enable this feature. Instead, I would recommend delaying loading external files on user interaction. 
  • Localization Files: Custom. In this section, you can type your website’s external JS files. These could be Google AdSense, Gravatar, Google Analytics, etc. Enter the file path here.
localization settings
Localization Settings

You could use these URLs in the localization files section:

### CDNs ###
https://ajax.cloudflare.com/
https://ajax.googleapis.com/ajax/
https://cdn.jsdelivr.net/
https://cdnjs.com/
https://cdnjs.cloudflare.com/
https://code.jquery.com/
https://netdna.bootstrapcdn.com/
https://oss.maxcdn.com/
https://stackpath.bootstrapcdn.com/

### Popular Scripts ###
https://stats.wp.com/
https://pagead2.googlesyndication.com/pagead/js
https://www.google-analytics.com/analytics.js
https://www.googletagmanager.com/gtag/js
https://www.googletagmanager.com/gtm.js
https://www.googletagservices.com/tag/js/gpt.js
https://www.google.com/recaptcha/api.js
https://maps.google.com/maps/api/js
https://maps.googleapis.com/maps/api/js
https://platform.twitter.com/widgets.js
https://platform-api.sharethis.com/js/
https://s7.addthis.com/js/
https://ws.sharethis.com/button/
https://connect.facebook.net/en_US/fbevents.js
https://connect.facebook.net/signals/config/

7.8 Tuning – JS

Tuning tools are used to exclude certain JS files from optimizations. 

As you can see in the screenshot, via the tuning settings, you can manage the following. Both full URLs and partial strings can be used.

  • JS Delayed Includes: You can add JS files or inline code that should be delayed for loading.
  • JS Excludes: List JS files or inline code that you don’t want to be minified or combined.
  • JS Deferred / Delayed Excludes: Specify JS files or inline code that will not be deferred or delayed.
  • Guest Mode JS Excludes: Enter JS files or inline code that do not need to be optimized for guest mode.
  • URI Excludes: Enter specific page URLs to exclude from optimization.
  • Optimize for Guests Only: ON. You can choose to optimize pages only for guest visitors; turning this off affects logged-in users.
  • Role Excludes: Exclude selected user roles from all optimizations to tailor your site’s performance.
tuning settings
JS tuning settings

7.9 Tuning – CSS

Here you can fine-tune CSS settings for better performance. Depending on your preferences, you can customize these options as per the screenshot. Both full URLs and partial strings can be used. 

  • CSS Excludes: You can list CSS files or inline code that need not be minified or combined.
  • UCSS File Excludes and Inline: Add CSS files that should be excluded from UCSS and saved inline.
  • UCSS Selector Allowlist: Enter CSS selectors that should always be included in UCSS; wildcards (*) are supported.
  • UCSS URI Excludes: Add specific page URLs to exclude from UCSS generation.
  • Separate CCSS Cache Post Types: You should Add post types to generate separate critical CSS, like “page”. 
  • Separate CCSS Cache URIs: Allo you to generate separate critical CSS files for URLs containing specific strings; use prefixes (^) and suffixes ($) for exact matches.
  • Critical CSS Rules: You should add the Critical CSS styles for above-the-fold content when enabling Load CSS Asynchronously to improve user experience.
tuning css
Tuning CSS

8. Database 

In this section, the LiteSpeed Cache has a custom database optimization tool. However, I would recommend using the WP-Optimize plugin when you need to optimize a WordPress database. 

Don’t forget to always make a backup before optimizing your database.

8.1 Manage

These options help you keep your database clean and optimized for better performance. The Database Optimizer section has the following options to manually optimize your DB:  

  • Clean All: You can clean all database items in one go.
  • Post Revisions: Allows you to clean all post revisions to free up space.
  • Orphaned Post Meta: It is a very useful option that helps you remove all orphaned post meta records which are usually created by old/unused plugins.
  • Auto Drafts: Easily clean all auto-saved drafts to keep your database lean.  
  • Trashed Posts: Remove all the deleted posts and pages to declutter your database.
  • Spam Comments: You can clean all spam comments in one click. 
  • Trashed Comments: Remove all deleted comments from Trash. 
  • Trackbacks/Pingbacks: Allows you to clean all trackbacks and pingbacks clutter.
  • Expired Transients: You can remove expired transient options and enhance DB efficiency.
  • All Transients: To clean all transient options easily.
  • Optimize Tables: This allows you to optimize all database tables in one go. 
  • Database Table Engine Converter: allows you to optimize old tables if any. 
  • Database Summary: This shows you the autoload size in KB and the number of autoload entries.

8.1 DB Optimization Settings

Here’s how to configure the options:

  • Post Revisions Max Number: 6. Too many post revisions can increase the size of your database and impact its performance. You should limit the maximum number of post-revisions to 6.
  • Revisions Max Age: 0. Keeping this value at 0 is optimal for most situations.
LS database optimization
LS database optimization

After the configuration, you can visit the database optimizer to clean the DB.

clean the database
Clean the database

Next, I will go to the crawler configuration.

9. Crawler

The crawler scans your site, automatically detects expired cache pages, and refreshes them to prevent users from encountering uncached pages. 

The default LiteSpeed cache plugin settings for crawlers are fine and optimized for search engine crawlers. However, if you want to get into the details of advanced-level crawler settings, I would suggest you read this guide here from LS

  • The Summary tab shows your cache crawler status and performance.
  • The Crawler Map tab helps you visualize your site’s crawling paths.
  • Blocklist lets you exclude specific URLs from being crawled.
  • General Settings help you customize how the crawler operates.
  • Configure simulation settings to test your crawler’s behavior without affecting your live site.
  • Manage sitemap settings to ensure all important pages are crawled efficiently by search engine crawlers.
crawler settings
Crawler Settings

10. Toolbox

The final customization option in the LiteSpeed plugin setup is Toolbox. It comes with multiple options, such as

  • Purge: You can clear your cache to free up storage and improve from current performance. 
  • Import / Export: Easily import or export your LiteSpeed Cache settings for convenience. 
  • View .htaccess: Check your .htaccess file to manage server configurations. 
  • Heartbeat: Control the WordPress heartbeat settings to optimize server resource usage. Check the details below.  
  • Report: Generate reports to analyze your cache performance and settings. 
  • Debug Settings: Access debug settings to troubleshoot any issues you may encounter. 
  • Log View: View logs to monitor cache activities and performance. 
  • Beta Test: Participate in beta testing to try out new features and improvements.
toolbox
LS Cache Toolbox

I won’t go through all the details here because, as you can see, the configuration options that affect your website’s speed here are minimal.

The only thing I will modify in this situation is the WordPress heartbeat.

10.4 Heartbeat

Here are the recommended settings for heartbeat interval:

  • Frontend Heartbeat Control: On. You need to enable this feature so you can control the frontend heartbeat.
  • Frontend Heartbeat TTL: 0. 0 is the best option.
  • Backend Heartbeat Control: On. to control the backend heartbeat, you should enable this option.
  • Backend Heartbeat TTL: 0. I will be using 0 here, too.
  • Editor heartbeat: On. You should enable this. I will modify the TTL next.
  • Editor Heartbeat TTL: 120. The default value is too low. This could harm your website’s performance. So, you can up the editor’s heartbeat to 120 seconds.
wordpress heartbeat
LiteSpeed Cache Heartbeat Control

That’s it.

According to this guide, you will achieve maximum performance once you configure the LiteSpeed Cache plugin. 

Some speed optimization features are missing in the LS Cache plugin such as page-level script manager. For that, I would recommend you step up Perfamtters with the LiteSpeed Cache plugin to achieve maximum performance. 

Perfmatters Configuration with LiteSpeed Cache

Perfmatters is an excellent website optimization plugin. Combining It with LiteSpeed could take website optimization to the next level.

Here’s how you configure the Perfmatters plugin.

General Settings

In the General Settings, you can see several optimization options.

perfmatters general settings
Perfmatters general settings

As shown in the screenshot above, you need to configure the plugin. The primary thing you need to do is to disable WordPress REST API when you’re logged out and use the default heartbeat frequency.

Script Manager

The Script Manager feature allows you to enable/disable specific JS, or CSS files (loaded by theme/plugins) on specific pages. That helps you optimize asset loading. Here are the steps: 

  • Enable the Script Manager: Enable it and visit your website’s front end to access it.
script manager
Access script manager
  • Testing Mode: In the Script Manager, enable testing mode to display dependencies and prevent site-breaking in case of code failures.
test mode
Enable test mode
  • Identify jQuery Dependencies: Search for plugins or themes that use jQuery, as this heavy JS library can affect your site’s performance. Avoiding jQuery dependencies is ideal.
jquery core plugins
jQuery core plugins
disable social snap
Disable social snap
  • Optimize Loading: Typically, social media sharing buttons are displayed only on posts, so there is no need to load plugin files on other pages like home or archives. Use the Script Manager to disable loading the plugin files elsewhere.

Here’s how you can do it:

Once you have modified the options, save the changes. Similarly, you can optimize the file serving of contact form plugins (which only need to be loaded on specific pages with contact forms).

Once you have completed the Script Manager modifications, save the changes and move to the preloading settings.

Preloading Settings

As of June 2024, the LiteSpeed Cache plugin doesn’t have the font or image preloading option. To use this function, you can use the Perfmatters plugin.

  • Preload Images: You can preload images from the settings to enhance your website’s speed.
  • Local Fonts: If you are using custom fonts and have hosted fonts locally, enter the file path in the preload option and select the type as “font.” This will help save loading time and optimize your website.
preloading
Perfmatters preloading

Save the changes once you are done with the customization.

LiteSpeed Cache Plugin Alternatives

While LiteSpeed Cache offers excellent performance for WordPress sites, especially those on LiteSpeed servers, there are several alternatives you could consider:

WP Rocket: A user-friendly premium plugin offering comprehensive caching and optimization features with minimal setup required. Read our in-depth WP Rocket guide.

FlyingPress: A performance-focused plugin that combines simplicity with advanced features like lazy loading, lazy render, and removal of unused CSS for CWV optimization. Read our full FlyingPress setup guide.

Swift Performance: An advanced caching solution ideal for high-traffic sites, providing extensive customization options for power users.

Perfmatters: A unique plugin that boosts performance by allowing users to disable unnecessary WordPress features and optimize scripts. Please read our detailed Perfmatters settings guide.

W3 Total Cache: A highly configurable free plugin supporting various caching types and CDN integrations for users who want granular control. Here is our guide on W3 Total Cache setup.

WP Fastest Cache: A freemium plugin offering an intuitive interface and essential caching features suitable for beginners and intermediate users.

Autoptimize: A free plugin specializing in front-end optimization through script and style aggregation, minification, and caching.

Super Page Cache for Cloudflare: A free plugin that leverages Cloudflare’s CDN to cache both static files and HTML pages, significantly improving website loading speeds by serving content from the nearest CDN location to the visitor.

Each of these alternatives offers unique features and benefits, catering to different needs and expertise levels, you should explore them as per your WordPress performance optimization needs.

Frequently Asked Questions

In this section, I will discuss some frequently asked questions about the plugin and the LiteSpeed Cache settings.

Is LiteSpeed Cache a Free WordPress Plugin?

Yes. LiteSpeed Cache is a free caching plugin you can download from the WordPress plugins repository. All the features offered in this plugin are free, and you do not need to spend a single penny to unlock any functions.

Do We Need to Combine LiteSpeed Cache with Any Other Plugins?

LiteSpeed Cache can work on its own. So, it won’t be necessary to use any other performance plugin alongside. However, if you need to maximize the plugin’s potential, you could use the Perfmatters plugin with LiteSpeed Cache.

Will the Plugin Cause Any Compatibility Issues?

The LiteSpeed Cache plugin is compatible with most third-party themes and plugins, so there will be no issues.

How to Track the Performance Improvements?

You must use tools like GTmetrix, Pingdom, or Google PageSpeed Insights to track the website’s performance. These tools will show you the page load time, and speed scores, and you can optimize the website further according to the results.

Conclusion

With the right WordPress caching plugin, you can optimize the speed of your website further. As you know, LiteSpeed cache is one of the best caching optimization plugins, with over 5 million active installations.

With suitable configuration options, you can have a blazing-fast website and optimized core web vitals scores. In this article, I have shown you the best LiteSpeed Cache settings. You can tweak the plugin by going through the individual configuration options.

Use a speed testing tool like GTmetrix or PageSpeed Insights to track the before and after results.

Would you use this LiteSpeed Cache settings on your WordPress/WooCommerce website?

Let us know in the comments.

Photo of author
Saurabh K
Web dev with a knack for content writing, speed optimization, SEO, and WordPress magic. By day: building fast, beautiful sites. By night: chasing coffee and ideas for my next technical write-up.
Disclaimer: Affiliate links of some product(s) are being used on this page, if you follow the link and make a purchase, we may receive compensation from respective companies. This compensation comes at no additional cost to you.

19 thoughts on “Best LiteSpeed Cache Settings [2024] for Unmatched Website Performance — Score a 100 on CWV”

  1. Avatar of monstro

    Great guide on LiteSpeed Cache settings! Your tips for perfect score on CWV are incredibly useful. Thanks for sharing!

    Reply
  2. Avatar of timhope

    Thanks for sharing such detailed and actionable guide on LS cache plugin setup. I’m going to implement and share the results!

    Reply

Leave a Comment

Your email address and website details will not be published. Required fields are marked with *.