Litespeed Cache Best Settings
/ / Litespeed Cache Best Settings (Just 6 Simple Steps)

Litespeed Cache Best Settings (Just 6 Simple Steps)

The Objective


In this tutorial, I will guide you on how to set up LiteSpeed cache best settings in just 6 simple steps to get the maximum benefits if you are using LiteSpeed cache technology web hosting. Also, keep in mind that different hosting providers will have a different level of LiteSpeed cache quality ranking. As usual, all my guides are beginner-friendly and actionable straight to the point. If you prefer video mode, just watch the tutorial video below.

If you would like to go for reading mode, keep on reading.

Warning: Every time you turn on each setting, you should load your front-end website to check everything load correctly and continue to turn on the next setting. The moment you see something is not loading correctly, you should go back to your dashboard to turn off the last setting.

LiteSpeed Cache plugin is an all-in-one website acceleration plugin, it has an exclusive server-level cache and a full set of optimization features and it also supports WordPress Multisite and is compatible with most popular plugins, including WooCommerce, bbPress, and Yoast SEO.

Preparation

  • Enable LiteSpeed Cache: Proceed to login to your web hosting managing dashboard or cPanel to make sure LiteSpeed cache feature is turn on for the domain name you want to use. You should look for “LiteSpeed Web Cache Manager” or something similar to do this.
  • Enable memcached and radis: In your cPanel go to PHP Selector > Extensions, check to enable both memcached and radis.
  • Install LiteSpeed Cache Plugin: You can Click Here to download the latest version of this plugin. Login to your WordPress dashboard and install this plugin. After you installed the plugin, just click activate the plugin.
  • After the plugin activated, you will see a new option “LiteSpeed Cache” on your WordPress dashboard. I will go through the setting tabs one by one.

Step 1: General Option


First, click on the “Request Domain Key” button. You need to have domain key in order for you to use the image optimization later or other online services for this plugin such as link to QUIC.cloud for CDN feature, Load CSS Asynchronously, etc. It will take a few minutes to approve. While waiting for the domain key to approve just proceed to the next setting.

Step 2: Cache Option

  • In “Cache” option go to “Purge” tab and turn on “Purge All On Upgrade” and click save.
  • In “ESI” tab, turn on “Enable ESI” and click save
  • In “Object” tab, turn on “Object Cache” in the “Status” box below you should see “Memcached Extension: Enabled and Redis Extension: Enabled” this is the features we have turn on in our cPanel earlier the preparation step
  • Under “Method” select “Radis” and change the port number to “6379” and click save.
  • Note: You need to test either using Memcached or Radis is better for your case. For my case, I am using Radis. Just remember, if you use Memcached, change the port number to “11211” or if you use Radis, change the port number to “6379”
  • In “Browser” tab, turn on “Browser Cache” and click save.
  • In “Advanced” tab, scroll to “Instant Click” to turn on and click save. This function is whenever someone visit your site and their mouse hover the link on your website, that page will begin to load before they actually click on that link. The pros is your website looks faster for visitor experience and the cons is your website may use more CPU resources.
  • You can give it a try for your case, if you found you don’t need it, you can always come back here to turn it off. For my case, I will turn it on for this test.

Step 3: CDN Option


For CDN option, I am using a free Cloudflare CDN account. If you don’t have an account, you can go here to create a free account. After that, add your website domain to Cloudflare. Just continue to follow the on-screen instructions for your Cloudflare account setup wizard on how to add your website domain to Cloudflare using the free plan.

After done, come back to your WordPress dashboard and scroll down to “Cloudflare API” and key in your account email address, global API key, and your domain name, and click save.

Step 4: Image Optimization Option

  • Click on “Image Optimization” option and go to “Image Optimization Settings” and turn on “Auto Request Cron”, “Create WebP Versions” and “Image WebP Replacement” and click on save.
  • Create WebP Versions and Image WebP Replacement function is for better image load on mobile version.
  • By now you should have your domain key approved where you requested earlier on Step 1 or you need to wait until it approved in order for you to use this function.
  • Once your domain key approved, click on “Image Optimization Summary” tab, then click “Gather Image Data” button and click “Pull Images” to run the image optimization.

Step 5: Page Optimization Option


In “CSS Settings” tab:

  • CSS Minify turn on
  • CSS Combine turn on
  • Load CSS Asynchronously turn on
  • Generate Critical CSS turn on
  • Generate Critical CSS In Background turn on.
  • Click save and the rest just leave as default.

In “JS Settings” tab:

  • JS Minify turn on
  • JS Combine turn on
  • Load JS Deferred turn on

In the “Optimization” tab:

  • HTML Minify turn on
  • Load Google Fonts Asynchronously turn on
  • Remove WordPress Emoji turn on

In the “Media Settings” tab:

  • Lazy Load Images turn on, for faster site image loading before visitor scroll down.
  • Lazy Load Iframes turn on, for better YouTube video embedded loading.

In the “Media Excludes” tab, just leave it as default if you don’t see any image loading error. But, if you found some image files can’t be load properly after turn on the lazy load function on the previous tab, then you will need to add the media file address in “Lazy Load Image Excludes” to tell the plugin to exclude lazy load feature.

In “Localization” just turn on “Gravatar Cache” and click save.

Step 6: Database Option

  • In “DB Optimization Settings” tab, it is better to set the “Revisions Max Number” to 5 and click save.
  • Warning: make sure to have backup copy of your website before proceed the database optimization in case anything goes wrong.
  • In “Manage” tab click Clean All.
  • Finally, at the top of your WordPress dashboard, click on the LiteSpeed logo and at the drop-down menu click “Purge All” and that’s it you are good to go.

Conclusion


In my opinion, this will be the best LiteSpeed cache settings for most of the LiteSpeed cache technology web hosting. You could even just enable the caching after you installed the plugin and leave everything else as default. The plugin would probably cache your site and run everything properly.

If you would like to get the full potential benefits of this plugin, then just follow the settings that I mentioned and the rest to leave it as default.

To start a WordPress website, click here.

Similar Posts

Leave a Reply

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