Best setting for LiteSpeed cache you need to know in 2020

Before we start you need to know about what is WordPress LiteSpeed Cache!

LiteSpeed Cache is also known as LSCache for WordPress, are an inbuilt technology and ultra-performance Dynamic Content Acceleration(DCA) advanced service provided LiteSpeed Web Server.

how does web cache work

To get the most performance from LiteSpeed Cache plugin you need to have a LightSpeed based web server or hosting server.

what does web cache mean

You must ensure you are using of these web servers to setup LiteSpeed Cache:

  • LiteSpeed Enterprise
  • Open Lite Speed
  • LiteSpeed Web ADC
  • QUIC Cloud CDN(Content Delivery Network)

What if I want to use LSCache without LiteSpeed Servers? 

You can install and use LiteSpeed Cache WP Plugin with most of the popular web servers like Apache, Nginx, etc. But you cannot get the most important features of LiteSpeed Cache is Web and Browser Caching Features. By the way, you can use most of the optimization functionality on non-LiteSpeed Web Servers.

LiteSpeed compatible plugins:

Let’s get started installation process of LiteSpeed Cache:

wordpress litespeed cache
  1. Login to your WordPress admin panel Dashboard
  2. Scroll down to plugin section and select add new
  3. In the Plugin Search Box enter these text “litespeed cache
  4. Install the WordPress plugin “LiteSpeed Cache” proudly served by LiteSpeed Technologies.
  5. Then activate it and you will redirect to all installed plugin sections.
  6. Find the LiteSpeed Cache Plugin and select Setting
Litespeed cache setting

Now you get cache-control setting with 8 Tab, These are

  1. Cache
  2. TTL (Time to Live)
  3. Purge
  4. Excludes 
  5. ESI
  6. Object
  7. Browser
  8. Advanced

Lets set these things up

1: Cache.

  • Enable Cache -> ON
  • Cache Logged-in Users -> OFF
  • Cache Commentators -> ON
  • Cache Rest API -> ON
  • Cache Login Page -> OFF
  • Cache Favicon.ico -> ON
  • Cache PHP resource -> ON
  • Cache Mobile -> OFF

Save these settings in Cache Tab.

2: TTL(Time to Live):

  • Default Public Cache TTL -> 6,04,800 Seconds or 1 Week
  • Default Private Cache TTL -> 1,800 Seconds or 30 Minute
  • Default Front Page TTL -> 6,04,800 Seconds, Decrease it if you continuously make changes on the front page.
  • Default Feed TTL -> 6,04,800 Seconds.(Recommended)
  • Default Rest TTL -> 1 Week
  • Default HTTP Status Code Page TTL -> No change

  Save these settings.

3: Purge

When you purge a page, this page previous caches are removed and updated resources are reloaded from the server and cached with the updated resource. 

So after changing anything don’t forget to purge the page to see the change you made.

  • Purge all on Upgrade -> ON
  • Auto Purge rules for Publish/Update -> Tick mark all things except All Pages,  Yearly Archive and Daily Archive.
  • Serve Stale -> OFF
  • Let other things unchanged and click save.

4: Excludes

  • Do not cache Roles -> Tick mark for Administrator, Editor, and Author

Because they make changes and edits all the time. To see what they make the change they will need every time using the page purge thing If you tick mark these three things they will not need to purge cache all the time they make changes.

5: ESI (Edge Slide Includes).

  • Enable ESI -> OFF
  • Cache Admin Bar -> OFF
  • Cache Comment Form -> ON
  • Keep other things unchanged and click save.

6: Object

Object Cache Setting

  • Object Cache -> ON
  • Method -> MemCached
  • Host -> LocalHost
  • Port -> 11211
  • Default Object Lifetime -> 360 Second
  • Username and Password (SASL is installed)
  • Persistent Connection -> ON
  • Cache WP Admin -> OFF
  • Store Transient -> ON

7: Browser Cache Setting

  • Browser Cache -> ON
  • Browser Cache TTL -> 2592000 Seconds or Almost 4 Weeks

8: Advance Setting:

No need to change any advanced setting.

Now the Cache Settings are completely configured for optimum performance.

In the General setting section, you can enable Automatic Upgrade of LiteSpeed Cache Plugin, Or can just set it to manual upgrade mode where you need to upgrade this plugin manually.

LiteSpeed cache image optimization

LiteSpeed Cache Image Optimization Setting:

Goto the 2nd Tab named as Image Optimization Setting:

  • Auto Request Cron -> ON
  • Auto Pull Cron -> ON
  • Optimize Original Images -> ON
  • Remove Original Backup -> OFF
  • Optimize LossLessly -> ON .
  • Preserve EXIF/XMP data -> ON
  • Create WebP version -> OFF
  • Image WebP Replacement -> OFF
  • WebP For Extra srcset -> OFF
  • WordPress Image Quality Control -> 90%(For high-quality images)
why cache is importrant

Reads more to improve WordPress health status

LiteSpeed Cache Page Optimization:

  •  CSS Setting Tab
    • CSS Minify -> ON
    • CSS Combine -> OFF(Recommended by Developers)
    • Unique CSS Files -> OFF
    • CSS HTTP/2 Push -> OFF
    • Load CSS Asynchronously -> OFF
    • General Critical CSS -> ON
    • Generate Critical CSS in Background -> ON
    • Inline CSS Async Lib -> ON
    • Font Display Optimization -> Default
  • JS Settings
    • JS Minify -> ON
    • JS Combine -> ON
    • JS HTTP/2 Push -> OFF
    • Load JS Differed -> OFF
    • Load Inline JS -> Default
    • Exclude JQuary -> ON
  • Optimization Settings
    • CSS/JS Cache TTL ->6,04,800 Seconds or 1 week
    • HTML Minify -> ON (May cause changes User Interface Rarely)
    • Inline CSS Minify -> OFF
    • Inline JS MInify -> OFF
    • DNS Prefetch Control -> OFF
    • Remove Comments -> OFF
    • Remove Query Settings -> OFF
    • Load Google Fonts Asynchronously -> OFF
    • Remove Google Fonts -> OFF
    • Remove WordPress Emoji -> OFF (Enable this to stop Emoji Functionality)
  • Media Settings
    • Lazy Load Image -> ON (Most Important and Recommended)
    • Responsive Image Placeholder -> ON
    • Responsive Placeholder Color -> Choose anything you like. This color will be shown instead of images when images are loading.
    • LQIP Cloud Generator -> On (If this is on , the very low-quality preview of the image will be shown to users when the images are loading, I think it is the best use instead of color preview.
    • LQIP Quality -> 4
    • LQIP Minimum Dimensions -> 150*150 Pixels
    • Generate LQIP in Background -> ON (Recommended)
    • Lazy Load iFrames -> ON
    • Inline Load Image Library -> ON
  • Media Excludes -> No changes needed.
  • Discussion Settings
    • Gravatar Cache -> ON
    • Gravatar Cache Cron ->ON
    • Gravatar Cache TTL -> 6,04,800 Seconds or 1 Week
  • Tuning Settings -> Default

Database Optimizer:

Tap to Clean All button to clean your database unused files and trashed files. These will also clean your revisions. If you want to keep your revisions select an individual option.

Database Optimization Settings:

You can set your max revisions to keep for a post or pages.

litespeed cache global api key

Setting up Cloudflare with LiteSpeed Cache.

  1. Sign up in Cloudflare
  2. Complete the necessary steps
  3. Goto my profile
  4. Find My API Tokens
  5. Goto to the global API Key and click view
litespeed api key
  1. You will require human verification and your password on Cloudflare to view global API Key
  2. Now copy your global API Key and past on WordPress dashboard Cloudflare AGlobal API key option on LiteSpeed settings. Put your email used for registering on Cloudflare
  3. Enter You root domain on Domain Box
  4. Click saves. 
cloudflare email address Problems and Solution

Now your LiteSpeed Cache and Cloudflare can work simultaneously.

Follow the Picture to understand Properly

Reads more to start a free wordpress blog

ajax loader Problems and Solution


One thought on “Best setting for LiteSpeed cache you need to know in 2020

Leave a Reply

Your email address will not be published. Required fields are marked *