The Correct LiteSpeed Cache Settings to Score Perfect 100

We need the 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.

I have already tested this website on several sites and found good usefulness when the right settings are turned on. 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.

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 best LiteSpeed Cache plugin settings to make your site better.

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.

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

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

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

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

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

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

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

  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.

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

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

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.

Leave a Comment

Exit mobile version