Best Litespeed Cache Plugin for Speed and SEO (December 2021)

Share this post

I already mentioned about Litespeed cache plugin when I spilled the secret of passing mobile Core web vitals on shared hosting on one of my websites “Petfather”. This plugin is the biggest reason I always prefer Litespeed Hosting. LS Cache plugin is probably the best answer to Google’s ever-growing hunger to speed and more speed and core web vitals and what’s not.

Litespeed cache plugin best settings
Litespeed cache plugin best settings

Why do I prefer the Litespeed Cache plugin?

There are plenty of reasons I can’t do without the LS cache plugin. Below are a few of them, which are enough to convince you to switch to the LS Cache plugin on a Litespeed web server.

  • This plugin makes your WordPress website tremendously faster by implementing server-side caching.
  • This plugin is free. You will not need to buy the WP Rocket plugin (apart from these two, other caching plugins are not worth mentioning).
  • An intelligent caching system makes sure that only the outdated files are purged, not the whole cache.
  • This plugin comes with the built-in QUIC.Cloud CDN, which is being widely regarded as the best CDN for speed and core web vitals nowadays. QUIC.Cloud CDN has a free tier, just like Cloudflare, but is better than Cloudflare in terms of speed and routing.
  • This plugin offers free image optimization, lazy loading and WebP conversion.
  • Litespeed web server enables http/3 and QUIC which are next generation technologies for higher speed.

Well, these features are quite enough for me, that too for free.

Can I use the LS Cache plugin on Apache or Nginx web servers?

Personally, I haven’t tried this plugin on Apache and Nginx web servers, for which I believe that WP Rocket is still the best. But, according to their website,

“Anyone can use the LSCWP plugin, even those who are using Apache, Nginx, or some other non-LiteSpeed server. However, none of the plugin’s caching functionality will be available to you. You are free to use all of the optimization features, but caching does not work without a LiteSpeed server.”

So yes, if you want to use just the CSS, JS optimizations, WEBP compression, and QUIC Cloud CDN, you can use the Litespeed cache plugin on Apache or Nginx. For caching, you may have to get something else.

Best Litespeed cache settings for SEO

I am going to share the settings I use in the LS Cache plugin, which gives me the best results when it comes to speed improvement and search engine optimizations (SEO).

Note: For best results, You may have to tweak some settings according to your requirements. After changing any setting, always purge the cache and check the webpages in incognito mode, on both mobile and desktop Also, this plugin is frequently updated. Hence, the best setting varies every now and then. I will keep updating this article as much as possible.

Let’s begin.

Hover on the Litespeed cache icon at the right sidebar of your WordPress admin dashboard and you will see the following options.

  • Dashboard
  • General
  • Cache
  • CDN
  • Image optimization
  • Page optimization
  • Database
  • Crawler
  • Toolbox

Now you have to click on these options one by one and do as I am telling you next, for best results.

1. Dashboard

As you guess, nothing much to be done here. You can see your QUIC.Cloud CDN and cloud optimization usages and quotas here, along with some pagespeed improvement stats.

2. General

Automatically Upgrade-ON

Domain Key: Request a domain key when setting up the first time. After the domain key is approved (takes around 10 minutes), connect to your QUIC.Cloud account for free. If you don’t have a QUIC.Cloud account, sign up here: https://my.quic.cloud/. Once set up properly, you can refresh the domain key when absolutely needed, e.g. when you change your hosting or upgrade your server.

Pro tip: create the QUIC Cloud account first, before requesting the domain key. It will be much easier to connect afterward. Also, you don’t need to do anything on the my.quic.cloud dashboard if you don’t want to use their CDN but only intend to use cloud optimization features. Connect it and forget it.

Note: You can connect several websites to one QUIC.Cloud account for free and use free CDN tier, and all CSS, JS, and image optimization features for free. Yep, that is what is magical about them.

Don’t change anything in the Tuning option here.

3. Cache

Here are many options you can see.

The Cache tab

  • Set ON all of these: Enable Cache, Cache Logged-in Users, Cache Commenters, Cache REST API, Cache Login Page, Cache favicon.ico, Cache PHP Resources
  • Cache Mobile-OFF
  • I don’t change anything else.

TTL

I don’t change default settings.

Purge settings

  • Purge All On Upgrade-ON
  • Auto Purge Rules For Publish/Update-Don’t change default settings.
  • Serve Stale-ON (Personal choice, speeds up WordPress admin dashboard when on a slow shared hosting)
  • No further changes are needed here.

Excludes

I don’t change anything here.

ESI

No changes.

Object Cache Settings

  • Object Cache: My hosting server doesn’t serve Memcache or Redis (lol), so I turned it OFF. If you have that privilege, turn it ON.
  • Scroll down
  • Persistent Connection: ON (to enable Keep-Alive on Litespeed. It’s a pretty awesome feature to improve pagespeed and core web vitals)
  • Cache WP-Admin-ON
  • Store Transients-ON

Browser Cache Settings

  • Browser Cache-ON
  • Browser Cache TTL-31557600 seconds

Advanced settings

No changes.

4. CDN

  • CDN settings: QUIC.cloud CDN-ON (because I use QUIC.Cloud CDN. If you use something else, turn it OFF)
  • Use CDN Mapping-OFF ()
  • HTML Attribute To Replace-no change
  • Original URLs-put your homepage URL here, sometimes it shows a wrong version of your website URL.
  • Cloudflare API-use if you are using Cloudflare CDN. In my case, it is OFF.

5. Image Optimization

Image optimization summary

  • During first-time setup-press ‘Gather Image Data
  • In the Optimization Tools on the right side, click “use optimized files“.

Image Optimization Settings

  • Auto Request Cron-ON (whenever you upload a new image it will automatically be sent to QUIC cloud server for optimization)
  • Auto Pull Cron-ON (automatically fetches optimized images from QUIC cloud)
  • Optimize Original Images-ON
  • Remove Original Backups-OFF
  • Optimize Losslessly-OFF
  • Preserve EXIF/XMP data-ON
  • Create WebP Versions-ON (WebP is the next-gen SEO friendly image format, always use whenever possible)
  • Image WebP Replacement-ON (will replace all the images with WebP version-good for SEO)
  • WebP Attribute To Replace-No need to change anything here
  • WebP For Extra srcset-ON
  • WordPress Image Quality Control-82

6. Page Optimization

CSS Settings

  • CSS Minify-ON
  • CSS Combine-OFF (no one combines CSS in 2022. It also messes up with the design, and creates enormous big CSS files to damage LCP core web vitals metric)
  • Generate UCSS-I don’t use UCSS yet. It is a great feature but under-developed. OFF.
  • UCSS Inline-OFF (maybe use when it is fully developed and tested)
  • CSS Combine External and Inline-OFF
  • Load CSS Asynchronously-ON. I may get criticized but I find critical CSS very helpful. Critical CSS generated by QUIC Cloud services gets loaded inline with HTML and other CSS files are asynchronously loaded. A major factor in pagespeed and CWV IMO.
  • CCSS Per URL-ON. (QUIC cloud offers a plenty of free quota for this so no worries for credit running out)
  • Inline CSS Async Lib-ON
  • Font Display Optimization-Swap (Though I never use Google fonts and only use system fonts in my theme Generatepress, swap is the safest speed-friendly option)

JS Settings

  • JS Minify-ON
  • JS Combine-OFF (it messed up with my website on mobile view. Mobile menu wasn’t working properly)
  • JS Combine External and Inline-OFF
  • Load JS Deferred-Deferred (Delayed option improves pagespeed core dramatically, but messes up with important javascript like Cookie consent banner, Adsense, etc.)

HTML Settings

  • HTML Minify-ON
  • DNS Prefetch-Go to webpagetest.org, put your URL, test, and go to domains to find the list of external domains (usually Google fonts, AdSense, and Analytics)that are being called. Put those domains in this box, one per line. Improves pagespeed.
  • DNS Prefetch Control-ON
  • HTML Lazy Load Selectors-I am not sure about this so I skip this.
  • Remove Query Strings-ON
  • Load Google Fonts Asynchronously-ON (again, I don’t use Google fonts, I use system fonts in Generatepress customizer, still I turn this ON to keep it safe)
  • Remove Google Fonts-OFF (let the system font, async and swap options previously selected do their job)
  • Remove WordPress Emoji-OFF
  • Remove Noscript Tags-OFF

Media Settings

  • Lazy Load Images-ON (remember, you need to exclude website logo and above-the-fold images to avoid CLS issues, in image excludes tab coming next)
  • Basic Image Placeholder-blank
  • Responsive Placeholder-ON
  • Responsive Placeholder SVG-keep default text as it is
  • Responsive Placeholder Color-default
  • LQIP Cloud Generator-ON
  • LQIP Quality-4
  • LQIP Minimum Dimensions-default (150×150)
  • Generate LQIP In Background-ON
  • Lazy Load Iframes-ON
  • Add Missing Sizes-ON
  • Inline Lazy Load Images Library-ON

Media Excludes

  • Lazy Load Image Excludes-Put the website logo URL because a lazy-loaded site logo will cause CLS and a bad user experience. Additionally, if some of the pages have above-the-fold images, lazy loading may cause CLS issues. Put those URLs here too.
  • LQIP excludes-scroll down all the way to this option and paste all the URLs that you had put in the lazy-load image exclude box.
  • No need to change anything else here.

Localization Settings

Gravatar Cache-ON

Gravatar Cache Cron-ON

Gravatar Cache TTL-604800

Tuning Settings

No need to change anything here.

7. Database Optimizer

Manage

I just press Clean all every 7-10 days, that’s all.

DB Optimization Settings

  • Revisions Max Number-1
  • Revisions Max Age-7 days

8. Crawler

Well, most shared hosting providers don’t allow to use the crawlers, and you don’t need it that much. So skip!

9. Toolbox

I use it for only one purpose, to clear the cache. Press Purge all after a major change sitewide. It is a good practice anyway to clear cache every 3-4 days to avoid most design and crawling-related issues. Press ‘Empty Entire Cache’ when things are out of hand and serious issues happen. Just don’t overdo it!

Check LS Cache status

Go to this website to check whether the Litespeed cache is working properly.

https://check.lscache.io/

Conclusion

That’s all, folks. I hope this setting will make your website faster and pass Core web vitals with flying colors.

FAQs

Is the Litespeed cache plugin free?

Yes, and that is the reason I use Litespeed hosting so that I don’t have to purchase WP-Rocket.

LS Cache plugin vs WP-rocket

WP-rocket is behind LS cache in some aspects-that is image optimization (WeBP creation), free CDN and more.

Litespeed cache plugin and no LiteSpeed server-does it work?

Yes, but only for CSS, JS, HTML, and image optimizations. Caching will not work.


Share this post

Leave a Comment