LiteSpeed Cache is one of the major optimization plugins for WordPress.
In this comprehensive guide, I'll cover everything you need to know about LiteSpeed Cache and the relevant settings that you should apply to your WordPress site to achieve the highest level of website optimization and PageSpeed Insights score.
Let's get started.
LiteSpeed Cache Plugin Intro
LiteSpeed Cache, also referred to as LSCache, is primarily a caching solution by LiteSpeed Technologies.
According to the docs, it's a highly customizable and more efficient alternative to Apache's mod_cache
and Varnish Cache.
While commonly found in the context of WordPress CMS, it's also available for a variety of popular Content Management Systems like Magento or Drupal.
Using LiteSpeed Cache Without LiteSpeed Web Server
Note that the LiteSpeed Cache for WordPress plugin offers 2 feature sets - General Features and LiteSpeed Exclusive Features - the latter which require one of the dedicated LiteSpeed web servers.
Read more about this on the WP plugin page.
Furthermore, to use the cache settings of the LiteSpeed Cache WordPress plugin, your website must be running on one of the LiteSpeed servers or using QUIC.cloud CDN.
Read more about this on the official LSCWP documentation page.
Installing and Setting Up the LiteSpeed Cache Plugin for WordPress
Before we see the recommended LiteSpeed Cache settings, we need to ensure the plugin is installed in the WordPress plugins section.
In your WordPress Plugins page, search for and install the LiteSpeed Cache plugin.
After installing this plugin, enable LiteSpeed Cache by activating it.
Once you've completed the above steps, refer to the next section to begin configuring LiteSpeed Cache.
LiteSpeed Cache Settings for WordPress Plugin
Before we configure the LiteSpeed Cache settings, it's highly advised that you take a full backup of your WordPress website (including the files, database, and other related content) to prevent any issues that may be caused by the plugin optimization settings or changes.
For each setting below, I have mentioned the recommended choice (on - enabled or off - disabled). Some settings are marked with "custom" to indicate that these depend on your choice and/or other settings.
Settings with "default" option mean that the default settings of LS Cache are fine as-is.
Note
Note that the current version of LSCache plugin at the time of writing this article is v6.0.0.1
.
Dashboard
The dashboard gives you an overview of the LSCache settings and status of various services like QUIC.cloud usage statistics.
There's nothing much to do here in terms of configuration.
It's a good idea to visit this page every once in a while, to ensure everything is set up and working as expected.
Presets
The LiteSpeed Cache Standard Presets allow you to configure the plugin in one click.
This is ideal if you'd like to apply the official recommended settings without manually configuring them, or if you don't have the time to do so.
Personally, I recommend manually configuring the settings as every website and web host is different and may require customized tweaking of each setting.
However, you should consider using a preset if you believe that it meets your requirements.
While the Presets page gives you complete details of each, I've briefly summarized them below.
Essentials
Use this preset to apply basic cache settings with a higher time to time-to-live (TTL) and enable browser cache.
This is a no risk preset that is ideal for simple and small websites where caching is a priority and asset optimization is not a concern.
Basic
It includes settings from the Essentials preset, in addition to image optimization and separate mobile cache.
This is a low risk preset that adds minimal optimizations to the site and requires a QUIC.cloud Domain Key to use it.
Advanced (Recommended)
It includes everything from the Basic preset, plus guest mode and various asset optimization, including HTML, CSS, JavaScript, and fonts.
It is considered a recommended preset by the LiteSpeed team and should not cause any conflicts on websites.
Aggressive
It includes all the optimization settings from the Advanced preset, and additional asset optimizations like concatenation of CSS and JS, lazy loading inline frames (iframe), asynchronous and critical CSS loading, and more.
As the name suggests, this may introduce site-breaking changes.
You may need to tune some settings like excluding select CSS and JS files.
Extreme
It includes every setting from the Aggressive preset, while further adding optimizations to images, JavaScript, and Cascading Style Sheets.
Notably, it lazily loads images, delays the execution of JS, concatenates or combines inline JavaScript and CSS, and generates viewport images.
As obvious it is, this might cause conflict on your website, so ensure thorough tests after enabling it.
General
The LiteSpeed Cache General Settings page allows you to configure some basic plugin settings, such as adding a Domain Key and enabling the Guest Mode.
General Settings
Automatically Upgrade: Off
Allows LiteSpeed Cache plugin to be updated automatically when a new version is released.
Ideally, keep this disabled to prevent unexpected bugs or errors caused by plugin updates.
Domain Key: Custom
Allows you to use QUIC.cloud services and its CDN.
QUIC.cloud is an online optimization service for WordPress websites. It offers various features such as image optimization, critical CSS, low-quality image placeholders, and more.
If your WP site is already optimized and/or you're using other CDN and optimization services like Cloudflare, keep this disabled.
If you decide to use it, you must request a Domain Key (Request Domain Key button) and add it first.
Guest Mode: Off
Greatly improves the user's first visit load time and Lighthouse speed scores by serving a cached version of the page which is then updated via AJAX requests.
However, based on my experience on using it on different websites so far, it often causes issues such as the page not getting updated properly once the user has it loaded.
This is a risky setting to enable, and I'd advise reading more about it in the official documentation to understand its impact on the web server and more.
Enable it only if everything on your WP site is functioning and working as expected (form submissions, load more, pagination, etc.).
Guest Optimization: Off
This setting is related and a part of Guest Mode. Guest Mode must be enabled to use this setting.
It further optimizes WordPress web pages by applying the maximum level of page and image optimization settings when serving the default cached version of the page.
As with the Guest Mode above, this setting has possible impacts on the web server and website.
Only enable it if all the plugins and themes work fine on your WordPress website.
Server IP: Custom
Reduces DNS and CDN lookup time delays by directly calling the IP address instead of the domain name.
Add your website IP address in the input field next to the setting to enable it.
Notifications: Off
Shows plugin notifications such as new version releases, bug fixes, and more.
Enable it if you prefer to receive such notifications.
Tuning
This tab allows you to add user agents and IP addresses which you'd like to be treated as guest mode visitors.
Generally, the default settings are fine, and you don't need to change or update anything here.
Guest Mode User Agents: Default
A list of user agents, one per line, to be treated as guest mode visitors.
Guest Mode IPs: Default
A list of IP addresses, one per line, to be treated as guest mode visitors.
Cache
As mentioned above, the cache features on this page will not work if your website is not running on the LiteSpeed web server or using QUIC.cloud CDN.
Cache (Tab)
The different range of settings on this tab allow you to configure high-level settings for page cache.
Enable Cache: On
Allows you to enable the full-page cache.
Cache Logged-in Users: Off
Allows private caching of pages for logged-in users.
Enable only if your website has several users logging in or if you run a membership type of website like forums.
Cache Commenters: Off
Allows private caching of commentators that have pending comments.
Enable only if users can comment on your website.
Cache REST API: On
Allows caching of WordPress REST API calls.
Cache Login Page: On
Allows caching of the WP login page (wp-admin).
Cache favicon.ico: On
Allows caching of the site icon (favicon) which is usually requested by the web browsers.
Cache PHP Resources: On
Allows caching of PHP resources used by some themes and plugins.
Cache Mobile: Off
Allows separate caching of the mobile version of the site in case it's different from the desktop version.
Enable only if your site has separate stylesheets or design for mobile devices.
If enabled, use the List of Mobile User Agents setting textbox to update the list of mobile user agents.
Private Cached URIs: Custom
Allows private caching of specified URLs.
Provide a list of URLs, one per line, to cache them as private.
Force Cache URIs: Custom
Allows force-caching of specified URLs regardless of the no-cache settings.
Provide a list of URLs, one per line, to forcibly cache them.
Force Public Cache URIs: Custom
Allows public force-caching of the specified URLs.
Provide a list of URLs, one per line, to forcibly cache them as public.
Drop Query String: Custom
Allows you to ignore certain query strings when caching.
Useful if you're using analytics or marketing scripts such as Google Analytics or Meta Pixel.
TTL
The settings in this section allow you to specify time to live or TTL values for different types of cache and resources.
Out of the box, the default settings on this page are fine as-is.
Default Public Cache TTL: Default
Allows you to specify how long, in seconds, the public pages are cached.
Default Private Cache TTL: Default
Allows you to specify how long, in seconds, the private pages are cached.
Default Front Page TTL: Default
Allows you to specify how long, in seconds, the front page is cached.
Default Feed TTL: Default
Allows you to specify how long, in seconds, the feeds are cached.
If you specify a value less than 30, this setting will be disabled, and feeds will not be cached.
Default REST TTL: Default
Allows you to specify how long, in seconds, the WordPress RESTful API calls are cached.
If you specify a value less than 30, this setting will be disabled, and REST API calls will not be cached.
Default HTTP Status Code Page TTL: Default
Allows you to specify the cache, in seconds, for an HTTP status code page.
Provide a list of HTTP status codes (404, 500, etc.) and their cache TTLs separated by a space, one per line, to specify different cache time-to-live for them.
Purge
This tab allows you to configure the purge settings when you purge the cache.
By default, you don't need to change any setting here.
Purge All On Upgrade: On
Automatically purges the site cache when any WordPress theme or plugin such as WooCommerce is updated.
Auto Purge Rules For Publish/Update: Default
Allows you to specify which type of pages are purged when using the Purge All On Upgrade setting.
Serve Stale: Off
Serves a stale copy of the cached page to the site visitors until a fresh cached copy is available.
This may serve an outdated version of the page or page with old content.
Scheduled Purge URLs: Custom
Allows you to specify URLs, one per line, which should automatically be purged based on a given time schedule (see below).
Scheduled Purge Time: Custom
Allows you to specify the purge time schedule if using the Scheduled Purge URLs above.
Purge All Hooks: Default
Executes a "purge all" action when any of the listed hooks are run by WordPress.
Excludes
This tab allows you to specify cache rules to be excluded from caching.
For most sites, you don't need to do anything here.
Do Not Cache URIs: Custom
A list of URLs, one per line, to exclude them from caching.
Do Not Cache Query Strings: Custom
A list of query strings, one per line, to exclude them from caching.
Do Not Cache Categories: Custom
A list of category names, one per line, to exclude them from caching.
Do Not Cache Tags: Custom
A list of tag slugs, one per line, to exclude them from caching.
Do Not Cache Cookies: Custom
A list of cookies, one per line, to exclude them from caching.
Do Not Cache User Agents: Custom
A list of user agents, one per line, to exclude them from caching.
Do Not Cache Roles: Custom
Allows you to select which WordPress user roles to exclude from caching.
ESI
This tab allows you to configure the ESI or Edge Side Includes settings.
I've personally never used this feature, so I can't recommend or suggest anything on this part.
The LiteSpeed Cache documentation page doesn't recommend using or modifying it unless you really need to. Read more about this.
Enable ESI: Off
Allows you to enable ESI.
Cache Admin Bar: Off
Allows you to enable caching of the built-in admin bar ESI block.
Cache Comment Form: Off
Allows you to enable caching of the built-in comment form ESI block.
ESI Nonces: Default
A list of nonces, one per line, to be converted to ESI automatically.
Vary Group: Default
Allows you to specify vary groups for user roles which cannot access certain public content on the site.
Object
This tab allows you to configure the Object cache for WordPress website.
Object Cache: On
Allows you to enable the Object cache.
Usually, the Status list will show Memcached Extension and Redis Extension (see below).
Method: Custom
Allows you to choose which cache method to use for your WP website if you've enabled the Object Cache setting.
Select whichever is available for your web server.
If your web server provides both, test and select whichever appears to be more efficient and faster.
Host: Default
Sets the hostname or IP address of the host.
The default is fine unless you need to change it.
Port: Default
Sets the default port.
The default port for Memcached is 11211
, and the default port for Redis is 6379
.
Default Object Lifetime: Default
Sets the default Object Cache TTL.
Username: Custom
Sets the username for the Object Cache connection.
Password: Custom
Sets the password for the Object Cache connection.
Redis Database ID: Custom
Sets the Redis database ID.
Global Groups: Default
Allows you to specify groups, one per line, that should be cached at the network level.
Do Not Cache Groups: Default
Allows you to specify groups, one per line, that should not be cached.
Persistent Connection: On
Allows you to enable keep-alive persistent connections to speed up cache operations.
Cache WP-Admin: On
Allows you to enable caching of WordPress admin dashboard (WP admin) to improve its speed.
Store Transients: On
Allows you to store WP transients in the database when the Cache WP-Admin setting is off.
Browser
This tab allows you to enable and configure the TTL for browser cache.
Browser Cache: On
Allows you to enable the browser cache.
Browser cache stores static files such as CSS or JS locally in the user's browser.
This improves the page-load speed for repeated page visits.
Browser Cache TTL: Default
Sets the browser cache TTL.
The default value of 31557600 seconds (1 year) is generally recommended and fine.
Advanced
The settings on this tab are meant for advanced users.
You generally don't need to do anything here, so you may leave them as-is.
Login Cookie: Default
Sets the default login cookie to determine if the user is logged in based on its existence.
Vary Cookies: Default
Sets the vary cookies such as third party vary cookies.
Improve HTTP/HTTPS Compatibility: Off
Improves the cache compatibility if your website is running in both HTTP and HTTPS.
Instant Click: Off
Allows preloading of the web page when the user hovers over its link.
This improves the page-load speed of the preloaded web page or link.
CDN
This page allows you to specify CDN settings for your site.
CDN Settings
On this tab, you can adjust various CDN settings.
QUIC.cloud CDN: Custom
Allows you to enable the QUIC.cloud CDN if you're using it.
Use CDN Mapping: Custom
Sets the URL of the CDN in case you're using it.
For instance, if your CDN serves assets through assets.*
subdomain, you'd use that subdomain or URL.
HTML Attribute To Replace: Default
Allows you to specify which HTML element attributes should be replaced with CDN mapping.
Original URLs: Default
Specifies the site URL that should be served through CDN.
Included Directories: Default
Allows you to specify which WordPress website directories should be pointed to the CDN.
Exclude Path: Default
Allows you to specify paths to be excluded from serving from the CDN.
Cloudflare API: Custom
Specifies Cloudflare API settings in case you're using it.
Global API Key / API Token: Custom
Sets the Cloudflare API token key.
Email Address: Custom
Sets the Cloudflare account email address.
It's optional if you've already set the Cloudflare API in the Global API Key / API Token setting.
Domain: Custom
Sets the website domain.
QUIC.cloud CDN Setup
This tab allows you to configure the settings for and set up the QUIC.cloud account.
Set up QUIC.cloud Account: Custom
Links to the QUIC.cloud account.
Manage
This tab allows you to manage settings for your CDN provider.
QUIC.cloud
If you're using QUIC.cloud CDN, visit the link provided on the page.
Cloudflare
Allows you configure Cloudflare settings if you're using it.
Development Mode
Allows enabling and checking of the Cloudflare Development Mode.
Cloudflare Cache
Allows you to purge the Cloudflare cache.
Image Optimization
This page allows you to specify image optimization settings.
Note that you need a QUIC.cloud Domain Key to use these image optimization services. Read more about it.
Image Optimization Summary
This tab gives an overview of the image optimization services and allows you to perform certain image optimization related actions such as doing a factory reset of all the image optimization changes.
Redetect Optimize images with our QUIC.cloud server
Allows you to send image optimization requests to the optimization server.
For the initial few requests, only a limited group of images is sent.
Optimization Status
Allows you to clean up unfinished image optimization requests.
Storage Optimization
Allows you to calculate the storage for original images.
Delete all backups of the original images
Allows you to delete backups of the original images.
Be cautious as this action is irreversible.
On the sidebar of the same tab, you have a few boxes showing the overall image optimization summary and more as mentioned below.
Image Information
Shows the information for image groups optimization.
Optimization Summary
Shows the status of total reduction, images pulled, last requested, and last pulled.
Optimization Tools
Allows you to switch between using the unoptimized (original) version and optimized versions of the images.
This affects all images on your site, including the original image format and the WebP version if available.
Destroy All Optimization Data
Allows you to do a factory reset of the image optimization changes.
This will delete all previous image optimization requests and results, revert any completed optimization request, and delete all the optimized image files.
Be cautious as this action is irreversible.
Image Optimization Settings
This tab allows you to configure settings related to images.
Auto Request Cron: On
Allows automating sending of the image optimization requests via cron job for the newly uploaded image files in the WordPress Media Library.
Auto Pull Cron: On
Automatically fetches the optimized images from the LiteSpeed's image server via a cron job.
You will need to manually fetch the optimized images if you disable this setting.
Optimize Original Images: On
Optimizes and saves backups of the original images in the same folder.
Remove Original Backups: Off
Automatically removes the original images after fetching the optimized images.
Be cautious when enabling it will permanently delete the original image backups.
Optimize Losslessly: Off
Uses the lossless image compression method.
This may improve the image quality but will result in large image file sizes.
Preserve EXIF/XMP data: Off
Allows you to keep the EXIF and XMP data of the image files.
Generally, you don't need that data.
Image WebP Replacement: On
Generates WebP versions of the images when optimizing them.
WebP Attribute To Replace: Default
Specifies a list of HTML element attributes, one per line, which should have their original image URL or format to be replaced with WebP format.
WebP For Extra srcset: On
Allows replacement of WebP in srcset attributes that are generated outside of WordPress functionality.
WordPress Image Quality Control: Default
Specifies the default quality to use when compressing the images.
The default value of 82 is fine.
Page Optimization
The wide range of settings listed on this tab are some of the core optimization settings that improve your WordPress site performance.
While these settings can make your site fast and performant, you should thoroughly test everything on the frontend after making any changes on this page.
CSS Settings
This tab allows you to configure Cascading Style Sheets related settings, such as CSS minification, concatenation, etc.
CSS Minify: On
Minifies or compresses the CSS files and inline CSS code found in the page markup.
CSS Combine: On
Combines or concatenates the CSS files and inline CSS code in the HTML markup.
Ideally, if your site uses minimal and lightweight design (CSS code), enable and test it.
However, if your website has lots of CSS files and/or contains complex stylesheets, you may want to keep the CSS files separated.
In some cases, keeping the CSS files separate may improve the page load speed and experience.
Generate UCSS: Off
Generates unique CSS by removing the unused CSS from each page.
You'll need a QUIC.cloud Domain Key to use this online optimization service.
UCSS Inline: Off
Adds inline UCSS to reduce the loading of extra CSS files.
CSS Combine External and Inline: On
Includes external CSS and inline CSS in combined file when the CSS Combine setting is enabled.
Load CSS Asynchronously: Off
Loads the CSS asynchronously to improve the CSS loading.
You'll need to set the QUIC.cloud Domain Key to use this optimization service.
CCSS Per URL: Off
Generates critical CSS per page.
Disabling this will generate CSS per post type instead of per page.
Inline CSS Async Lib: On
Allows inlining of the asynchronous CSS to prevent render-blocking issues.
Font Display Optimization: Swap
Specifies the method to use when loading or displaying the fonts.
The Swap method is recommended which prevents render-blocking issues.
JS Settings
This tab allows the optimization of JavaScript on your WordPress site, such as JS concatenation and minification.
JS Minify: On
Compresses or minifies the JavaScript files and inline JS code in the HTML markup code.
JS Combine: On
Concatenates or combines the JavaScript files.
Consider disabling it if you notice longer script execution delays, as splitting JS files may help in certain situations.
If you enable it, consider thoroughly testing your site.
JS Combine External and Inline: On
Includes external and inline JavaScript code when the JS Combine setting is enabled.
Load JS Deferred: Custom
Determines the JavaScript loading method on the page.
The Deferred method executes JS as soon as HTML is loaded.
The Delayed method delays the execution of JS until a user activity is detected on the page (mouse click or pointer movement, for instance).
Ideally, use the Deferred method if it meets your requirements and doesn't cause any site-breaking issues.
Try and only enable the Delayed method if you notice further site performance gains without any issues.
HTML Settings
This tab allows you to specify HyperText Markup Language related settings such as HTML minification, DNS prefetch, removing Google fonts, etc.
HTML Minify: On
Compresses or minifies the HTML code in the web page.
DNS Prefetch: Custom
Allows you to specify a list of DNS records, one per line, to prefetch.
Ideally, you'd want to add any third-party domain names that should be loaded as soon as the page starts to load to reduce network latency, like Google Analytics or Facebook Pixel.
DNS Prefetch Control: On
Allows automatic DNS prefetching of all URLs in the HTML document, such as images, CSS, and JS.
DNS Preconnect: Custom
Allows you to specify a list of DNS records, one line, to preconnect when loading the page to reduce the latency for third-party origins.
HTML Lazy Load Selectors: Custom
Allows you to specify a list of HTML element selectors, one per line, to delay their rendering until they are visible in the viewport.
Remove Query Strings: On
Removes the query strings from internal site assets like CSS or JS.
Load Google Fonts Asynchronously: Off
Loads Google fonts asynchronously by using a web font loader library.
This option also adds a preconnect to Google fonts DNS.
Turn this on if you're using Google fonts, else keep this option disabled.
Remove Google Fonts: On
Removes Google fonts from loading on your website pages.
Generally, it's better to self-host Google fonts by uploading them to your website to reduce third-party network requests.
Turn this on if you're self-hosting the fonts or not using Google fonts.
Remove WordPress Emoji: On
Removes WordPress custom emoji sets.
Disabling this option will render the default emoji of the browser or the device.
Turn this option on if your website has no use of emojis.
Remove Noscript Tags: On
Removes all the <noscript>
HTML tags from the page markup.
Media Settings
This tab allows configuration of media and images settings.
Preload Featured Image: On
Loads page or post featured image first before rendering other page content.
This might improve the page speed score and prevent issues like high Cumulative Layout Shift (CLS) and Largest Contentful Paint (LCP) delays.
Lazy Load Images: On
Defers the loading of images until they are within the user's viewport.
Basic Image Placeholder: Custom
Sets a custom image placeholder to use for images while they are being loaded.
By default, LiteSpeed Cache plugin includes a gray image placeholder as mentioned on the page.
Responsive Placeholder: On
Uses responsive image placeholders for images until they are loaded.
This helps prevent CLS issues.
Responsive Placeholder SVG: Default
Specifies an SVG placeholder to use for the responsive placeholder for images.
Responsive Placeholder Color: Default
Specifies the color for the responsive placeholder SVG.
The default color is fine, unless you want to define a custom if you want to make it more in line with your brand or website color scheme.
LQIP Cloud Generator: Off
Uses QUIC.cloud service to generate a responsive low-quality image placeholder (LQIP) for images while they are loading.
Turn this on if you're using QUIC.cloud services or want to generate LQIP versions of website images.
LQIP Quality: Default
Specifies the quality of LQIP images.
The acceptable range of values is between 1 and 20.
The default value of 4 is fine.
LQIP Minimum Dimensions: Default
Specifies the minimum dimensions for LQIP images.
Generate LQIP In Background: On
Generates LQIP images in the background via a cron job.
Lazy Load Iframes: On
Defers loading of inline frames (HTML iframe) until they are within the viewport.
Add Missing Sizes: On
Sets missing width and height attributes to image elements.
This helps in reducing page layout shifts to improve the CLS core web vital.
VPI
This tab contains settings for viewport images - the ones which appear above the fold.
Note that this tab uses the QUIC.cloud services.
Viewport Images: On
Loads all viewport images eagerly (prevents lazy loading).
This is good for above-the-fold images as it helps prevent content layout shifts and delays in painting the largest content images.
Viewport Images Cron: On
Generates viewport images via a cron job in the background.
Media Excludes
This tab allows you to specify media excludes.
Generally, you don't need to change anything here.
Lazy Load Image Excludes: Custom
Specifies a list of images as full URLs or partial strings, one per line, to exclude them from lazy loading.
Lazy Load Image Class Name Excludes: Custom
Allows you to specify a list of class names of image elements, one per line, to exclude from lazy load.
Lazy Load Image Parent Class Name Excludes: Custom
Allows you to specify a list of class names of parent HTML elements of images, one per line, to prevent lazy loading.
Lazy Load Iframe Class Name Excludes: Custom
Allows you to specify a list of iframe class names, one per line, to prevent lazy loading.
Lazy Load Iframe Parent Class Name Excludes: Custom
Allows you to specify a list of parent HTML elements of iframes, one per line, to exclude from lazy loading.
Lazy Load URI Excludes: Custom
Allows you to specify URLs, one per line, to exclude from lazy loading.
LQIP Excludes: Custom
Allows you to specify URL of image files, one per line, to exclude them from generating their LQIP version.
Localization
On this tab, you can configure various localization settings such as caching Gravatar, localizing third-party resources, and so on.
You may leave the settings on this page as-is as there's nothing much to do here.
Gravatar Cache: Off
Stores Gravatar locally to accelerate the website speed.
Turn this on if your website uses Gravatars.
Gravatar Cache Cron: Off
Refreshes Gravatar cache via a cron job.
Turn this on if your site uses Gravatars.
Gravatar Cache TTL: Default
Specifies the TTL for Gravatar cache.
The default value is fine if you're using Gravatars and its caching.
Localize Resources: Off
Allows you to store external assets such as third-party CSS or JS by downloading them locally on your web server or website.
This helps reduce network requests but may result in bugs if the third-party resource is updated frequently or so.
I'd personally advise leaving this setting disabled unless you are sure this won't cause any issues.
Localization Files: Custom
Allows you to specify which third-party resources are localized by specifying the resource URL, one per line.
Tuning - JS
The Tuning tab allows you to tweak various JavaScript settings such as excluding certain JS files from delaying or minification.
Generally, you may not need to add or update anything here.
However, if you notice some specific third-party script not working, for example, consider adding it on this page in the relevant exclude section.
JS Delayed Includes: Custom
Specifies which JS files or JS code, one per line, should always be delayed.
JS Excludes: Custom
Specifies which JS files or inline JS script code, one per line, should never be minified or combined.
By default, LiteSpeed Cache adds jQuery library and its minified version to this list as it is a commonly used library by many themes and plugins.
JS Deferred / Delayed Excludes: Custom
Specifies which JavaScript files or inline JavaScript code, one per line, should never be deferred or delayed.
By default, WP LS Cache plugin adds jQuery JS library, its minified bundle, and Google Analytics library, and Google Tag Manager JS library to this list as they are commonly used on many websites.
Guest Mode JS Excludes: Custom
Specifies which JS files or inline JS code, one per line, should never be optimized (minified or combined) by the Guest Mode.
URI Excludes: Custom
Specifies which pages or URLs, one per line, should never be optimized.
Optimize for Guests Only: On
Allows optimizing of pages only for guest users, not logged in users.
This helps prevent redundant generation of CSS and JS files for each logged in user or user group, saving website disk space and resources.
Role Excludes: Default
Specifies which user roles or groups should be excluded from optimization.
The defaults are fine as no user role should be excluded from optimization.
Tuning - CSS
The Tuning for CSS tab allows you to tweak various Cascading Style Sheets related options just like the JS tuning tab above.
Usually, you don't need to configure anything here as long as your website is working or looking correct after enabling CSS optimizations.
CSS Excludes: Custom
Specifies which Cascading Style Sheets or inline CSS code, one per line, should never be optimized (compressed or concatenated).
UCSS File Excludes and Inline: Custom
Specifies which CSS files, one per line, should be excluded from UCSS and instead added as inline code in the HTML code.
UCSS Selector Allowlist: Custom
Specifies which CSS selectors (IDs or classes), one per line, should always be included in the UCSS.
UCSS URI Excludes: Custom
Specifies which pages or URLs, one per line, should not generate UCSS.
Separate CCSS Cache Post Types: Custom
Allows you to specify post types, one per line, to have their own critical CSS generated.
Separate CCSS Cache URIs: Custom
Allows you to specify pages or URLs, one per line, to have their own critical CSS generated.
Critical CSS Rules: Custom
Specifies the critical CSS rules for above-the-fold content when using the Load CSS Asynchronously option.
Database
The Database page gives you various tools and settings for purging content on your WordPress site which is no longer needed or safe to delete, such as expired database transients.
Manage (Database)
From this tab, you can execute 1-click cleanup tasks for your WordPress database and its tables.
Database Optimizer
In this section, you may use one of the options to safely clean up your WordPress database, such as deleting spam comments, removing expired WordPress transients, and more.
Clean All
Allows you to clean up the entire WordPress database by performing all the listed individual cleanup options in one go.
Note that this option will not execute the Optimize Tables and Clean CSS/JS Optimizer tasks.
Post Revisions
Deletes all post revisions.
Auto Drafts
Removes drafts of all posts.
Trashed Posts
Cleans up all trashed posts and pages.
Spam Comments
Deletes all spam comments.
Trashed Comment
Removes all trashed comments.
Trackbacks/Pingbacks
Cleans all trackbacks and pingbacks.
Expired Transients
Removes all expired transients.
All Transients
Deletes all transients whether expired or not.
Optimize Tables
Optimizes all tables in the WordPress database.
Database Table Engine Converter
Honestly, I haven't noticed anything listed in this section and its usage so far.
You may safely ignore this.
Database Summary
This section shows a summary of your WordPress database and its tables, such as the autoload entries and their size.
DB Optimization Settings
On this tab, you can tweak certain settings when using the Database cleanup tools such as the maximum number of revisions to keep during the cleanup.
Revisions Max Number: Default
Specifies the maximum number of revisions to keep during the cleanup process.
The default value of 0 is fine, unless you need to keep some revisions like 2 or 3.
Revisions Max Age: Default
Specifies revisions to keep newer than the specified day(s) when cleaning up.
The default value of 0 is fine.
Crawler
The LiteSpeed Cache Crawler page allows you to configure the LS Cache crawler that runs through your WordPress site.
The LS Cache Crawler goes through all your site pages with expired caches and refreshes them.
Summary
This tab gives you an overview of the crawler status such as the server load, cron names and their crawling status, and so on.
Crawler Cron
Allows you to monitor the progress and status of various crawlers on your website.
Watch Crawler Status
Allows you to monitor the detailed status of each crawler if you've opted to watch the crawler status.
Map
This tab shows URLs currently in the crawler map and allows you to clean or refresh the crawler map.
Blocklist
This tab allows you to see a list of all the URLs in the blocklist and remove them if needed.
You can also empty the entire blocklist using the Empty Blocklist button.
General Settings (Crawler)
This tab allows you to configure different LiteSpeed Cache Crawler settings.
Crawler: Off
Allows you to enable the WP LS Cache crawler cron.
Enable it if you need it.
Delay: Default
Sets the delay, in microseconds, between each crawl request on your website.
Run Duration: Default
Specifies the time, in seconds, for the duration of each crawl cron.
Interval Between Runs: Default
Specifies the time interval, in seconds, for each crawl break time before running again.
Crawl Interval: Default
Specifies after how much time, in seconds, the crawler should restart the crawling process of the site.
Threads: Default
Specifies how many threads to use while crawling the site.
The default value of 3 is fine to prevent high load on the server.
Timeout: Default
Sets the crawler timeout delay for each URL or page, in seconds, before crawling the next URL or page.
Server Load Limit: Default
Sets the server load limit after which the crawling process should be terminated.
This is to ensure the crawler doesn't hog the entire server resources.
The default value of 1 is ideal for a 2-cores web server.
Simulation Settings
This tab allows you to run the crawler in simulation mode by crawling the site as a specific user role or with a specified cookie.
By default, the crawler on your site runs as a guest user (not logged in).
Role Simulation: Custom
Specifies the user IDs, one per line, to crawl the site as.
Cookie Simulation: Custom
Allows you to specify cookies which the crawler uses to crawl the site as.
Sitemap Settings
From this tab, you can specify your website sitemaps the crawler should use to crawl your site and other related settings.
Custom Sitemap: Custom
Specifies which XML sitemap URLs, one per line, the crawler should use to crawl your site.
Drop Domain from Sitemap: On
Allows you to save database storage space by dropping the site domain name after parsing the sitemap.
If you're using multiple domains for one website, consider disabling it so the crawler goes through every domain.
Sitemap Timeout: Default
Specifies the timeout, in seconds, while parsing the sitemap.
Toolbox
The LiteSpeed Cache Toolbox provides several tools and settings for purging site cache, configuring the WordPress Heartbeat, viewing logs, opting in to use the beta version of LS Cache, and other similar options.
Purge (Toolbox)
This tab allows you to purge different kinds of caches, such as the built-in page cache, cache for static assets like JS or CSS, and more.
Purge
In this section, you can use one of the 1-click options to clear different types of site caches.
Purge Front Page
Purges the website's front-page cache.
Purge Pages
Purges the cache for all site pages.
Purge 403 Error
Purges the cache for all 403 error pages.
Purge 404 Error
Purges the cache for all 404 error pages.
Purge 500 Error
Purges 500 error pages cache only.
Purge All - LSCache
Clears cache entries created by the LSCache for WordPress plugin.
Purge All - CSS/JS Cache
Removes caches for all minified or combined CSS and JS.
Purge All
Deletes all cache entries created by the LiteSpeed Cache plugin except for critical CSS, unique CSS, and LQIP image caches.
Empty Entire Cache
Deletes all cache entries of the current site, including other web applications.
The LSCWP documentation advises to only use this option if things are incorrectly cached on your website as it will put load on the site to cache everything again.
Purge By...
Allows you to purge by either category, post ID, tag, or URL.
You can enter, for instance, the category slugs in the text box, one per line, to clear their cache.
Import / Export
The import and export tab of this plugin provides you with the ability to easily export your entire LiteSpeed Cache settings and save them as a file.
You can then import that settings file into a fresh WordPress website to quickly restore all the saved settings.
Furthermore, you can also do a complete factory reset of all the LiteSpeed Cache settings in case something is wrong or if you'd like to start afresh.
Export Settings
Allows you to export the current WordPress LiteSpeed Cache plugin settings as a file which you can download on your PC for future use.
Import Settings
Allows you to import existing WP LS Cache plugin settings from a saved settings file.
Note that this will override any existing LiteSpeed Cache plugin settings you may have on the current site.
Reset All Settings
Resets all the LiteSpeed Cache plugin settings to factory defaults.
Be cautious when using this option as it's not reversible.
View .htaccess
This tab allows you to view your website htaccess file and its related info.
.htaccess Path
Shows you the frontend and backend paths of your site's .htaccess file.
Current .htaccess Contents
Displays the contents of your WordPress htaccess file.
Heartbeat
On this tab, you can configure the WordPress heartbeat settings.
Be careful when changing its settings or disabling the Heartbeat as it may cause WordPress tasks triggered by AJAX to stop functioning.
Frontend Heartbeat Control: Off
Allows controlling the WP Heartbeat on the frontend.
Frontend Heartbeat TTL: Default
Specifies the frontend Heartbeat TTL, in seconds, when using the Frontend Heartbeat Control option.
The default value of 60 seconds is fine.
Setting it to 0 will disable this Heartbeat.
Backend Heartbeat Control: Off
Allows controlling the WordPress Heartbeat in WP Admin dashboard.
Backend Heartbeat TTL: Default
Specifies the backend Heartbeat time to live, in seconds, when using the Backend Heartbeat Control option.
The default value of 60 seconds is fine.
Setting it to 0 will disable this Heartbeat.
Editor Heartbeat: Off
Allows controlling the WP Heartbeat in WordPress backend editor.
Editor Heartbeat TTL: Default
Specifies the editor Heartbeat time-to-live (TTL), in seconds, when using the Editor Heartbeat option.
The default value of 15 seconds is fine.
Setting it to 0 will disable this Heartbeat.
Report
This tab allows you to view and share some of your web server and site technical information with the LiteSpeed support team in case you run into any issues or such when using LSCache.
LiteSpeed Report
This section shows your website system info and LiteSpeed report number and date, among other things.
System Information
Shows detailed information about the WordPress configuration and environment of your website.
Use the Send to LiteSpeed button to send the site system information to the LiteSpeed support team.
Passwordless Link
Allows you to generate a passwordless link for the current logged-in user to be sent with the report.
Note that you must first install the DoLogin Security WordPress plugin to generate a passwordless link for LiteSpeed support team access.
Notes
Allows you to provide any additional information to be included in the report.
Debug Settings
The various debug settings on this tab allow you to instantly disable any or all LiteSpeed Cache settings for your WordPress for site testing or debugging purposes.
Debug Helpers
This section allows you to view your site before optimization or before cache by clicking on the relevant buttons.
View Site Before Optimization
Allows you to view the site by turning off all the LiteSpeed Cache optimization settings.
This option adds a ?LSCWP_CTRL=before_optm
query string to the URL which turns off all the plugin optimization settings.
View Site Before Cache
Allows you to view the site by disabling the cache of LiteSpeed Cache.
This option adds a ?LSCWP_CTRL=NOCACHE
query string to the URL which fetches a fresh version of the page without cache.
Debug Settings
This section provides several options related to debugging.
Disable All Features: Off
Disables all LiteSpeed Cache optimization features for debug or test purposes.
Debug Log: Off
Allows to enable the debug log.
It saves the debug file as debug.log
in the WordPress wp-content
directory.
Note that if your site is functioning as expected, you should keep this option disabled to prevent the redundant disk space usage by the debug log file.
Admin IPs: Custom
Allows you to specify admin IP addresses, one per line, which can perform certain actions from their browsers.
Debug Level: Custom
Specifies the level of information to be logged in the debug log file.
The Basic option logs general information.
The Advanced option logs more detailed information.
Log File Size Limit: Custom
Sets the maximum file size limit of the log file.
Log Cookies: Custom
Allows logging of the requested cookie values in the log file.
Collapse Query Strings: Custom
Shortens the query strings in the log file to improve its readability.
Debug URI Includes: Custom
Allows you to limit logging of the specified URLs only, one per line.
Debug URI Excludes: Custom
Allows you to prevent logging of the specified URLs, one per line.
Debug String Excludes: Custom
Allows you to exclude logging of the log entries which contain the specified strings, one per line.
Log View
From this tab, you can view or clear various debug logs, such as purge or crawler logs.
Debug Log
Shows the LiteSpeed Cache debug logs.
Purge Log
Shows the WP LSC purge log.
Crawler Log
Shows the LS Cache Crawler logs.
Clear Logs
Clears all the log entries.
Beta Test
This tab allows you to participate in the beta versions of the LiteSpeed Cache plugin.
You can try and test various versions, including the latest GitHub Dev commit or latest WordPress release version, or downgrade to previous versions.
Simply enter the specific version number or GitHub commit and then click on the Upgrade button to switch between versions.
Use latest GitHub Dev commit
Uses the most recent commit in the development branch of the LiteSpeed Cache GitHub repository.
This may be experimental and is not recommended for production sites.
Use latest GitHub Master commit
Uses the most recent commit in the master branch of the LS Cache GitHub repository.
This is usually a candidate for later public release and safe to use on production sites.
Use latest WordPress release version
Uses the official current release of LiteSpeed Cache for WordPress plugin.
You can use this to stop testing beta versions and go back to the latest version of the WordPress LS Cache plugin.
Apart from these 3 options, you may also downgrade to older versions as listed on the page, such as to 5.7.0.1
, 5.6
, 5.51
, and so on.
Avoid downgrading to versions which are not recommended and marked in red color as they may cause fatal errors due to major code refactoring or changes.
Wrapping Up
That's everything you needed to know about LiteSpeed Cache.
In this complete guide to LiteSpeed Cache WordPress plugin settings, we saw all the options available in the LiteSpeed Cache WP plugin, which options you need to configure and their recommended settings to get the highest optimization for your WordPress website.
I hope you find this article helpful and are able to set up the LiteSpeed Cache plugin properly without facing any issues.
And if you found this guide helpful, I'd highly appreciate you sharing this with others.
If you believe I missed a point or anything, let me know.
Refer below to the FAQs or additional resources section if you'd like to gain more insights about LiteSpeed Cache by LiteSpeed Technologies.
Getting Help with Configuring LiteSpeed Cache for WordPress Plugin
If you don't have the time to manually install the LiteSpeed Cache plugin and configure it or need help with a particular setting or anything related, feel free to contact me via my email at [email protected].
I'll help you install LiteSpeed Cache and apply the recommended settings to optimize your WordPress installation for the best possible speed outcome.
You can also get in touch with me on various social media platforms (see my social media links below).
Frequently Asked Questions Regarding LSCache for WordPress
How do I set LiteSpeed Cache?
To set LiteSpeed Cache for your WordPress website, follow the above guide.
How do I optimize LiteSpeed?
Follow the above guide to optimize LiteSpeed Cache with the right settings for your WP site.
Should I use LiteSpeed Cache?
LiteSpeed Cache is one of the major site optimization plugins for WordPress websites.
If you're not using any other optimization plugins, you should use LiteSpeed Cache to get speed optimization benefits for your website.
And if your website is already running on one of the LiteSpeed web servers, then it makes even more sense to use it to get maximum benefits of LiteSpeed server caching and more.
How do I reset my LiteSpeed Cache settings?
Resetting your LiteSpeed Cache plugin settings is quite easy.
Simply go to WP admin dashboard > LiteSpeed Cache > Toolbox page > Import / Export tab > Reset All Settings section.
Then, click on the Reset Settings button to completely reset the plugin settings to factory defaults.
Alternatively, see the Import / Export section of this guide above to learn more about resetting LiteSpeed Cache settings.
How do I know if LiteSpeed Cache is working?
There are a few ways to check if LiteSpeed Cache is working for your site.
The quickest way is to use the official LSCache Check tool by the LiteSpeed team.
Alternatively, you can also check for the presence of the x-litespeed-cache
response header using the browser developer tools.
This header also confirms if the web page was successfully cached or not.
How do I manually clear the LiteSpeed cache?
To manually clear LiteSpeed cache, navigate to LiteSpeed Cache > Toolbox page > Purge tab > Purge section.
Then, click on the Empty Entire Cache button to completely clear the LiteSpeed cache of your website.
Alternatively, refer to the Purge (Toolbox) section of this guide above to learn how to clear the LiteSpeed cache.
How do I disable cache in LiteSpeed options?
To disable the cache of LiteSpeed, go to WP admin backend > LiteSpeed Cache > Cache page > Cache tab > Cache Control Settings section.
Then, turn off the Enable Cache setting to disable the LiteSpeed cache.
Alternatively, see the Cache section above to learn more about disabling cache in LiteSpeed options.
What is the benefit of LiteSpeed Cache?
Apart from a powerful caching solution, LiteSpeed Cache offers many other benefits such as optimizing website assets like JavaScript, CSS, images, fonts, and HTML.
You can also leverage the QUIC.cloud services to further optimize your website images by lazily loading them, adding WebP support, generating low-quality image placeholders, among other image optimization benefits.
LiteSpeed Cache also allows you to quickly and safely optimize your WordPress website database and its tables.
These are some of the major benefits of using LiteSpeed Cache.
Read the above article to learn more about the advantages of using LiteSpeed Cache.
How do I optimize images in LiteSpeed?
To optimize images in LiteSpeed Cache, you must first obtain a Domain Key from the QUIC.cloud website by going to the WordPress dashboard > LiteSpeed Cache > General page > General Settings tab > General Settings section.
Then, click on the Request Domain Key button to request a Domain Key.
After getting approved and obtaining the Domain Key, head over to WP dashboard > LiteSpeed Cache > Image Optimization page to configure various image optimization settings.
Also see the WP dashboard > LiteSpeed Cache > Page Optimization page > Media Settings and VPI tabs for additional image optimization settings.
Alternatively, read the article above for optimizing images in LiteSpeed Cache.
Does LiteSpeed Cache for WordPress work with OpenLiteSpeed?
Yes, LiteSpeed Cache for WordPress works with OpenLiteSpeed. Read more about it here.
Additional Resources to Use the LiteSpeed Cache WordPress Plugin
If you'd like to dive deeper into LiteSpeed Cache specifics and technical info, refer to the following links.
- LiteSpeed Cache for WordPress (Source: LiteSpeed Technologies Inc.)
- What is LiteSpeed Cache? (Source: LiteSpeed Technologies Inc.)
- LiteSpeed Cache GitHub repository (Source: GitHub)