LiteSpeed Cache Settings to Score Perfect 100

We need best LiteSpeed cache settings for ideal performance of WordPress site. If you don’t optimize the settings, the plugin can slow down instead of improving speed.

Only an experienced web developer who has good experience with cache plugins can install the right configuration. We made it easy for beginners of WordPress to use the best settings for LiteSpeed cache plugin.

Litespeed Cache is a WordPress caching plugin that is known for its speed and performance. It is a popular choice among WordPress users because it is easy to use and it offers a lot of features.

Some settings become resource intensive and some may break down the site if not configured properly. But I found that using QUIC.cloud with the correct settings of the LiteSpeed Cache plugin can improve the core web vitals and UX of the site.

In our LiteSpeed Cache review, we have mentioned the features, benefits, speed test results of using both the plugin and QUIC.cloud CDN. In this post you are going to learn the litespeed best settings to make your site better.

WordPress LiteSpeed Cache

If you are using WooCommerce, then you should consider using Litespeed Cache.

It has a special setting for WooCommerce that can speed up your website.

When right settings are turned on, you can see the benefits. You do not need any code to figure out the settings.

They are all obvious. Only thing is you should know which one to set on and off.

Also different hosting services don’t have LiteSpeed Server. In that case, you need to use an alternative or QUIC.cloud.

litespeed cache best settings
LiteSpeed Cache Settings to Score Perfect 100 10

Default Settings

When you install and activate the cache plugin it comes with some predefined settings. You can keep them as it is and test your speed scores on test tools like GTMetrix, PageSpeed Insights, WebPageTest etc.

If you are satisfied with the results, speed and core web vitals, then you can use them without changing any other settings. But some hosting services servers break or not improve the site speed based on these settings. In that case you need to make some changes to these settings.

Best LiteSpeed Cache Settings

When it comes to caching, LiteSpeed offers multiple options to configure. You can find the LiteSpeed Cache settings page under “Performance -> LiteSpeed Cache” in your WordPress admin area. In this article, we will cover the best LiteSpeed Cache settings for WordPress.

The first setting you need to configure is “EnableCache“. This setting enables the caching functionality on your WordPress website. We recommend that you enable this setting for better performance.

The next setting is “CachePrivacyMode“. This setting determines who can see the cached version of your website. If you set this setting to “Private“, only logged-in users will be able to see the cached version of your website. If you set it to “Public“, anyone will be able to see the cached version of your website. We recommend that you set this setting to “Public” for better performance.

LiteSpeed Cache Configuration

The next setting is “BrowserCacheTTL“. This setting determines how long the browser should cache static resources on your WordPress website. We recommend that you set this setting to a value of “3600” for better performance.

The next setting is ” CrawlerIpAccess“. This setting allows you to specify which IP addresses can access the cached version of your website. We recommend that you set this setting to “*” for better performance.

The next setting is “EntityTagHeader“. This setting allows you to specify whether or not ETags should be used on your WordPress website. We recommend that you enable this setting for better performance.

The final setting is “ExpiryType“. This setting allows you to specify how long cached pages and objects should be expired on your WordPress website. We recommend that you set this setting to “TIME_IN_SECS“.

Once you have configured these settings, click on the “Save Changes” button at the bottom of the page to save your changes.

LiteSpeed Best Settings

There are a few things you need to know before diving into the best settings for LiteSpeed Cache. The first is that LiteSpeed Cache is a server-level caching solution. This means that it’s installed on your web server and then activated for your WordPress site. The second is that because it’s a server-level caching solution, it’s incredibly fast. In fact, LiteSpeed Cache is one of the fastest caching solutions available.

When it comes to the best settings for LiteSpeed Cache, there are a few general guidelines you should follow:

1. Use LSCache for All Your Sites
2. Use LSCache with WordPress Shared Hosting
3. Use LSCache with WordPress Dedicated / VPS Hosting
4. Use LSCache with WordPress Multi-Site (Network)
5. Use LSCache with WordPress eCommerce Sites
6. Use LSCache with Static HTML Sites
7. General Guidelines for Using LSCache

Related Post :   QUIC Cloud - Review on CDN Settings | Pricing | WordPress

LiteSpeed Cache setup

Litespeed’s cache plugin is one of the easiest to use and configure. We’ll go over the basics of setting it up for maximum speed and performance.

First, you’ll need to install and activate the plugin. Then, go to Settings > LiteSpeed Cache and click on the General tab.

In the General tab, you’ll want to check the following settings:

Enable cache: This will turn on caching for your website.

Cache TTL: This is how long Litespeed will keep cached files before refreshing them. The TTL can be set in seconds, minutes, hours, or days. We recommend setting it to 1 hour for most websites.

Public Cache: This setting controls whether non-logged in users will see cached versions of your pages or not. If you’re not sure what to choose, we recommend checking this box.

Private Cache: This setting controls whether logged in users will see cached versions of your pages or not. If you’re not sure what to choose, we recommend checking this box.

feed cache: This setting controls whether RSS feed items will be cached or not. If you’re not sure what to choose, we recommend checking this box.

Enable Static Files: This setting allows Litespeed to serve static files (like CSS and JS) from its cache. We recommend checking this box.

Enable Browser Cache: This setting allows visitors’ browsers to cache static files from your website. We recommend checking this box.

General Settings

  1. General
  2. Cache
  3. CDN
  4. Image Optimization
  5. Page Optimization
  6. Database
  7. Crawler
  8. Toolbox

Each of these basic settings will have sub-settings to improve your speed score. Some settings work out for all site users, hosting service and CDN. But for some, you need to test yourself if it works out correctly.

This may sometimes take time in clearing the cache, testing the speed and UX tools and then switching off the settings. Whenever you are in doubt, leave the default settings.

General

litespeed cache best settings
LiteSpeed Cache Settings to Score Perfect 100 11

General Settings

  1. Automatically Upgrade – ON
  2. Domain Key – Click the button to request a Domain Key for free. Using this key link to the QUIC.cloud CDN online service.
  3. Guest Mode – ON
  4. Guest Optimization – ON
  5. Server IP – Get these details from your domain registrar or hosting service.
  6. Notifications – ON

Tuning

  1. Guest Mode User Agents
  2. Guest Mode IPs

Leave the default settings.

Cache

litespeed cache settings
LiteSpeed Cache Settings to Score Perfect 100 12

Cache Control Settings

  1. Enable Cache – ON
  2. Cache-Logged In Users – OFF
  3. … Commenters – OFF
  4. Cache REST API – ON
  5. Cache Login Page – ON
  6. .. PHP Resources – ON
  7. Cache Mobile – Varies. If you are using AMP pages, turn it OFF. Otherwise, if not using any other mobile cache, then turn it ON.
    1. List of Mobile User Agents
  8. Private Cached URLs – Default
  9. Force Cache URLs – Default
  10. Force Public Cache URLs – Default
  11. Drop Query String – ON

TTL

  1. Default Public Cache TTL
  2. Default Private Cache TTL
  3. … Front Page TTL
  4. Default Feed TTL
  5. Default REST TTL
  6. …. HTTP Status Code Page TTL

Leave the default settings.

Purge Settings

  1. Purge All on Upgrade
  2. Auto Purge Rules for Publish/Update
  3. Serve Stale
  4. Scheduled Purge URLs
  5. Schedule Purge Time
  6. ,,, All Hooks

Leave the default settings.

Excludes

  1. Do Not Cache URIs
  2. Do Not Cache Query Strings
  3. … Cache Categories
  4. Do Not Cache Tags
  5. … Cache Cookies
  6. Do Not Cache User Agents
  7. Do Not Cache Roles

Leave default settings.

ESI Settings

  1. Enable ESI – Depends
  2. Cache Admin Bar
  3. Cache Comment Form
  4. ESI Nonces
  5. Vary Group

If you want the WordPress Dashboard operations to be quick, you can set this to ON. Even then, if there is no change, then you can turn it OFF. Most of the time it is used for dynamic pages to break little blocks and load them when necessary.

Object Cache Settings

  1. Object Cache – ON
  2. Method – Depends on your hosting server. Generally, MemCache is supported by most of the hosting services. If Redis is supported, you can enable it from the Control Panel or Dashboard of the hosting server settings.
  3. Host
  4. Port
  5. Default Object Lifetime
  6. Username
  7. Password
  8. Redis Database ID
  9. Global Groups
  10. Do Not Cache Groups
  11. Persistent Connection – ON
  12. Cache WP-Admin – OFF
  13. Store Transients – ON
Related Post :   QUIC Cloud - Review on CDN Settings | Pricing | WordPress

Leave other settings to the installation default settings.

Browser Cache Settings

  1. Browser Cache – ON
  2. .. TTL – 31557600

Advanced Settings

  1. Login Cookie – Default
  2. Improve HTTP/HTTPS Compatibility – ON. If you are not using any other CDN or cache system to enable this setting, then you can turn it ON. Some third-party resources on your site are HTTP. So even if you have an HTTPS certificate installed, modern browsers will still show a warning. This setting will rectify that.
  3. Instant Click – ON

CDN

litespeed cache cdn
LiteSpeed Cache Settings to Score Perfect 100 13

CDN Settings

  1. QUIC.cloud CDN – ON. First you need to activate the domain key in the earlier steps to make use of this CDN.
  2. Use CDN Mapping – OFF
  3. HTML Attribute To Replace
    1. Original URLs
    2. Included Directories
    3. Exclude Path
  4. Cloudflare API – OFF, if you are using QUIC.cloud. Otherwise turn it on and enter the API credentials of your Cloudflare account. You can use either QUIC.cloud and Cloudflare accounts. Not both. Free account is possible with Cloudflare.

Manage

  1. QUIC.cloud
  2. Cloudflare

Based on the above settings.

Image Optimization

best litespeed cache image optimization settings
LiteSpeed Cache Settings to Score Perfect 100 14

Image Optimization Summary

  1. Optimize images with our QUIC.cloud server
  2. Optimization Status
  3. Storage Optimization

Image Optimization Settings

  1. Auto Request Cron – ON
  2. Auto Pull Cron – ON
  3. Optimize Original Images – ON
  4. Remove Original Backups – OFF. Be careful with this setting. If you turn it ON, the original images will be removed and will be replaced with the optimized images. In case, you want to revert back to the original ones, it will not be possible. For best backup measures, always keep it OFF.
  5. Optimize Losslessly – ON
  6. Preserve EXIF/XMP data – OFF
  7. Create WebP Versions – ON
  8. Image WebP Replacement – ON
  9. WebP Attribute To Replace – Default
  10. WebP For Extra srcset – ON
  11. WordPress Image Quality Control – Default

Page Optimization

best litespeed cache page optimization settings
LiteSpeed Cache Settings to Score Perfect 100 15

CSS Settings

  1. CSS Minify – ON
  2. … Combine – OFF
    1. Generate UCSS – OFF
    2. UCSS Inline – OFF
  3. CSS Combine External and Inline – OFF
  4. Load CSS Asynchronously – OFF
    1. CCSS Per URL – OFF
    2. Inline CSS Async Lib – OFF
  5. Font Display Optimization – default

JS Settings

  1. JS Minify – ON
  2. … Combine – OFF
  3. JS Combine External and Inline – OFF
  4. Load JS Deferred – Deferred. If this setting breaks the site then revert back to the default setting OFF. In most cases, this setting can improve core web vitals, by improving the CLS score. But some hosting services may not adapt properly. Then, use the default setting.

HTML Settings

  1. HTML Minify – ON
  2. DNS Prefetch
  3. DNS Prefetch Control
  4. HTML Lazy Load Selectors
  5. Remove Query Strings
  6. Load Google Fonts Asynchronously – ON
  7. Remove Google Fonts – OFF. If you are using system fonts, then you can turn it ON. In most cases, for better typography you use one of the Google fonts. In that case, you need to set both 6. and 7. as above. 
  8. Remove WordPress Emoji – ON
  9. Remove Noscript Tags – ON

Other settings you can leave in the default state.

Media Settings

  1. Lazy Load Images – ON
  2. Basic Image Placeholder – Provide a default image, to be used as placeholder
  3. Responsive Placeholder – ON. If you want the above placeholder to be responsive on mobile.
  4. Responsive Placeholder SVG – Upload the SVG version of placeholder.
  5. Responsive Placeholder Color – Change it if you feel it.
  6. LQIP Cloud Generator – ON. If you are using high quality image placeholders. This will reduce its size. LQIP stands for Low-quality Image Placeholder.
  7. LQIP Quality
  8. … Minimum Dimensions
  9. Generate LQIP In Background
  10. Lazy Load Iframes – ON
  11. Add Missing Sizes – ON
  12. Inline Lazy Load Images Library – ON

Leave other settings as default.

Media Excludes

  1. Lazy Load Image Excludes
  2. Lazy Load Image Class Name Excludes
  3. … Parent Class Name Excludes
  4. Lazy Load Iframe Class Name Excludes
  5. .. Iframe Parent Class Name Excludes
  6. Lazy Load URI Excludes
  7. LQIP Excludes

If you want to prevent a lazy load of above-the-fold images, class-based exclusion then these settings can be useful. These are for advanced users.

Localization

  1. Gravatar Cache
    1. Gravatar Cache Cron – ON
    2. .. TTL – ON
    3. Gravatar Cache TTL – default

Tuning

  1. CSS Excludes
  2. JS Excludes
  3. UCSS Whitelist
  4. UCSS URI Excludes
  5. Separate CCSS Cache Post Types
  6. Separate CCSS Cache URIs
  7. Critical CSS Rules
  8. JS Deferred Excludes
  9. Guest Mode JS Excludes
  10. URI Excludes
  11. Optimize for Guests Only
  12. Role Excludes

Keep the default settings.

Database

best litespeed cache db optimizaton settings
LiteSpeed Cache Settings to Score Perfect 100 16
  1. Manage – Database Optimizer – Empty the transients, post revisions, auto drafts, spam comments, trashed comments, optimize tables etc can be done here.
  2. Database Table Engine Converter – Display of db tables which are more technical and can be left alone.
  3. Database Summary – Autoload size and entries of the db tables are mentioned here.
Related Post :   QUIC Cloud - Review on CDN Settings | Pricing | WordPress

DB Optimization Settings

  1. Revisions Max Number – 5 to 10 . By keeping this value you will be able to keep the revisions of db tables. Too many revisions can cause bloating. If your DB space is less, keep it to a minimum. But default of 0 is not advisable, as you will not have backup.
  2. Revisions Max Age – Default

Crawler

best litespeed cache crawler settings
LiteSpeed Cache Settings to Score Perfect 100 17

This setting is used to crawl the expired cache of pages and refresh them. But it consumes a lot of resources. That is why it is not allowed by most of the shared hosting plans. But if you have a dedicated server, you can turn it on the General setting page. You need to enable the Crawler, submit your sitemap and then leave the other settings to default.

Summary

  1. Crawler Cron
  2. Watch Crawler Status

Map

  1. Sitemap List

Blacklist

General Settings

  1. Crawler
  2. Delay
  3. Run Duration
  4. Interval Between Runs
  5. Crawl Interval
  6. Threads
  7. Timeout
  8. Server Load Limit

Simulation Settings

  1. Role Simulation
  2. Cookie Simulation

Sitemap Settings

  1. Custom Sitemap
  2. Drop Domain from Sitemap
  3. Sitemap Timeout

Toolbox

best litespeed cache toolbox heartbeat settings
LiteSpeed Cache Settings to Score Perfect 100 18

Purge

This setting is useful to purge your LiteSpeed Cache at an individual level. There are different types of purge level settings like –

  1. Purge Front Page
  2. Purge pages
  3. … 403 error
  4. Purge 404 error
  5. Purge 500 error
  6. … – LS Cache
  7. Purge All – CSS/JS cache
  8. Purge All – Object Cache
  9. … – Opcode Cache
  10. Purge All – Unique CSS
  11. Purge All – LQIP Cache
  12. .. – Gravatar Cache
  13. Purge All
  14. Empty entire cache

Purge means to clear the cache on the server and CDN. The last two settings are useful if your front end is not displaying as intended. Even if you make changes to the site design, it may not display correctly. In such a situation, using the Empty entire cache can be useful. But it should not always be used. As that will reduce the performance speed of the site.

You can also purge the cache by category, post id, tag, url.

Import/Export

  1. Export Settings
  2. Import Settings
  3. Reset All Settings

If you want to use the same LiteSpeed Cache settings on another site, then you can export and import them. The exported settings file is a .data file. Then you can import those settings into a new site. It saves time to configure all the settings again on a fresh site. Sometimes, settings can cause issues and even after purging the cache, the site may not work as intended. In such a case, you can reset all the LiteSpeed Cache settings to their default and start fresh.

View .htaccess

LiteSpeed Cache View .htaccess

The LiteSpeed Cache settings will add some code to your .htaccess file. This is a file stored in the root directory of your site. It is an important configuration file for your site. You can view the file path and contents of .htaccess here.

.htaccess Path

  1. Frontend .htaccess Path
  2. Backend .htaccess Path

Current .htaccess Contents

Heartbeat

Heartbeat Control

You do want to limit the heartbeat timing, as it consumes a lot of resources. Most cache plugins only provide a single control of Heartbeat. But in the LiteSpeed Cache plugin case several settings are provided.

  • Frontend Heartbeat Control – ON
  • Frontend Heartbeat TTL – 120
  • Backend Heartbeat Control – ON
  • Backend Heartbeat TTL – 0
  • Editor Heartbeat – ON
  • Editor Heartbeat TTL – 60

Most of the heartbeat settings improve the WordPress dashboard performance by performing quick operations.

Report

LiteSpeed Report

  • System Information
  • Passwordless Link
  • Notes

The site and server information is mentioned above. But if you want to provide admin access to the LiteSpeed technical support team, you can create a passwordless link and send it to them. In that way they can debug your site for LiteSpeed Cache settings or issues and make changes.

Debug Settings

  • Disable All Features
  • Debug Log
  • Admin IPs
  • Debug Level
  • Log File Size Limit
  • Log Cookies
  • Collapse Query Strings
  • Debug URI Includes
  • Debug URI Excludes

Most of the above settings are used to debug the features of the LiteSpeed cache plugin. If you are a technical expert and can understand PHP and plugin code, then these settings are useful to you. Otherwise, you can leave the default settings.

Log View

You can clear the debug log and other debugging information from here.

Beta Test

Generally, stable builds are updated to the latest version of LiteSpeed cache plugin. But if you want to use the beta builds from GitHub directory, then you can make the setting change here.

LiteSpeed Cache Settings to Score Perfect 100
LiteSpeed Cache Settings to Score Perfect 100

4 Comments
Show all Most Helpful Highest Rating Lowest Rating Add your review
  1. Reply
    GetSocialGuide at

    This is a fantastic post that contains a lot of useful information. I appreciate you writing on LiteSpeed Cache for WordPress since it’s really useful to us.

  2. Reply
    ToTemat at

    Hello, I have a question about LiteSpeed Cache. Do you need to use these third-party cloud and redis services in this plugin to see positive differences in website speed. And why, after installing this plugin, the database is many times larger. I have a small website on the lite speed server https://totemat.pl/ and I do not know why it is that when I run this plugin, the website works slower than faster according to google page speed. Maybe you have any suggestions?

    • Reply
      David Garofalo at

      @TOTEMAT I am just starting using this plugin. I see your site as of today (10-5-2023) runs quick. Did you stay with Lightspeed cache alone? Or did you combine with a CDN? If you are willing to share your experience I’d apricate it. tyia

    • @Thanks for your question. You can use LS Server + LS Cache + Cloudflare (Free) and see the difference. Also the default settings of LS cache are good enough to give good speed. Check if you have Adsense or any other third-party JS code enabled. They can slow down. Check with WebPageTest tool to see the waterfall where the resources are taking time. Then you can reduce that. Also, DB optimization tool is there in LS cache. You can optimize the db with that. Let me know if you have any other questions.

    Leave a reply

    WordPress Reviews
    Logo