LiteSpeed Cache Plugin Configuration – Supercharge Your Site

L

Most of the users are not aware of LiteSpeed Cache Plugin Configuration – so today in this detailed tutorial you will learn about LiteSpeed Plugin Configurations.

Page and image caching are some of the most beneficial things you can do for your WordPress website. When it’s done right (and when your server is running LSCache), it makes your website respond much more quickly.

That gives a boost to your Search Engine Optimization (SEO) efforts, which can lead to higher search results rankings.

Not to mention that a more responsive site can increase sales conversions if you have an online store. LiteSpeed Cache is one of the best, most comprehensive WordPress caching plugins available, and we are going to talk about it in this tutorial.

After going over the installation of the plugin, we’ll talk about some of the technical details. Like how cached web pages are served, and the different kinds of caching.

But before we get to all of that, let’s talk a bit about caching.

What is Caching?

When we’re talking about the LiteSpeed Cache plugin, we’re primarily talking about page caches. A cached page is a copy or version of a page. But why does it benefit visitors to create a copy of a page?

When a browser requests a WordPress website page, the server performs multiple functions to put the page together.

Before anything is rendered in the browser, the server has to (at the minimum):

  • Get the latest posts.
  • Generate a header and footer.
  • Find and place sidebar widgets.
  • Learn how the media should be displayed.

Complex pages like those on e-commerce sites can require dozens of steps to complete to display a page.

Most of the functions happen in milliseconds. But when you start to add them up, they can take some time. Which, in turn, increases the time needed to load a page.

A caching plugin will make a copy of that completed page, made up of all those parts. Then it displays that copy when the page is requested (for a predefined period).

That way, if three visitors request the same page within a minute or two, the page only has to be “built” once. The second and third visitors see the pre-built copy, which loads much faster since there’s no build time.

So caching gives your site the ability to respond more quickly, giving it an overall SEO boost. And perhaps most importantly, making for a better visitor experience.

LiteSpeed Cache

LiteSpeed Cache, is an all-in-one cache plugin for WordPress. It features a server-level cache and an expansive collection of optimization features.

LiteSpeed Cache supports multi-site WordPress installations and is compatible with most popular plugins, including Yoast SEO and WooCommerce.

Some of the more popular features include:

  • Minifying CSS, JavaScript, and HTML
  • Automatically generating critical CSS
  • Minifying inline CSS and JavaScript
  • Image optimization (lossless/lossy)
  • The ability to combine CSS and JavaScript
  • Lazyloading images and iframes

And it’s a cliche, but those are just the tip of the iceberg. If you want your website cached without a lot of manual tinkering, the LSCache plugin is for you.

Let’s install the plugin and go over a few of the available options.

LiteSpeed Cache Plugin Configuration

Step 1: Install LiteSpeed Cache

In the left column navigation, mouse over the “Plugins” link and click the “Add New” link.

In the search box, enter, “LiteSpeed Cache” and when you will find the plugin click on the “Install Now” button.

Now the plugin is installed, but it has to be activated before you can use it.

Click the “Activate” button.

Step 2: LiteSpeed Cache Overview

When LiteSpeed Cache is enabled, it begins improving your website speed immediately, before you configure anything.

Before we talk about settings, you should know that the LSCache plugin can run in two ways:

  1. Without a LiteSpeed server – this essentially means that you can use all the optimization features but not caching.
  2. With a LiteSpeed Web Server and LSCache license – this option gives you full functionality and both optimization and cache features.

If you want to use the caching features, you may have to contact your hosting provider to switch to a LiteSpeed Web Server.

Hivalidity WordPress Hosting Plans run on LiteSpeed Web Servers, and the LiteSpeed Cache plugin is automatically installed when you install WordPress.

Okay, let’s get to those settings.

In the left column navigation, mouse over the “LiteSpeed Cache” link. You’ll see a number of options.

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

Some of the available options are advanced or require a QUIC.cloud account. We’re going to cover everything on this tutorial. Just hold on to the cockpit and be ready to skyrocket.

Step 3: LiteSpeed General Settings

In this step, we are going to use QUIC.cloud CDN on our WordPress. QUIC.cloud is an intelligent cache CDN based on LiteSpeed, is the only CDN service that can accurately cache dynamic pages (pages that can change frequently). LSCache for WordPress knows when to automatically purge and sync data in QUIC.cloud CDN, giving it the upper-hand on all other CDN providers. Users can now provide anyone across the globe access to their sites in less than 100ms. QUIC.cloud also provides image optimization and CSS, LQIP optimization.

In the left column navigation, mouse over the “LiteSpeed Cache” link and click the “General” link.

Next click on the “Request Domain Key” button, on the right side of the Domain Key box.

You will see a notification at the top indicating that the application was successful, and to wait for the result. Refresh the page. The Domain Key setting should have been automatically updated with the new key. Click the Link to QUIC.cloud button to register your account with QUIC.cloud and set up the CDN.

You will be redirected to QUIC.cloud to sign in or sign up.

Now enter your email address and click on “Sign in/up” you will be asked to choose a password and to agree to the QUIC.cloud terms and conditions. Do so, and click Register.

You will be sent a validation email. Check your email for a message from QUIC.cloud, and confirm your account by clicking the activation link.

QUIC.cloud setup is complete. Click My Dashboard to be redirected back to WordPress.

Now, on the same General settings page, scroll down and on the “Server IP” box enter your server IP, if you don’t know your server IP, then click on “Check my public IP from DoAPI.us” shown on the below screenshot. After entering your server IP, click on “Save Changes“.

Step 4: LiteSpeed Cache Settings

In the left column navigation, mouse over the “LiteSpeed Cache” link and click the “Cache” link.

From the LiteSpeed Cache Settings click on the “Object” tab and follow the below settings.

  • Object Cache: Enable
  • Method: Redis
  • Host: localhost
  • Port: 6379

Then Click on “Save Changes

Then, click on”Browser” tab and enable the Browser Cache and Click on “Save Changes“.

Step 5: LiteSpeed Cache CDN Settings

In the left column navigation, mouse over the “LiteSpeed Cache” link and click the “CDN” link.

On the QUIC.cloud CDN section, turn ON the option, and click on “Save Changes“.

Step 6: LiteSpeed Page Optimization Settings

In the left column navigation, mouse over the “LiteSpeed Cache” link and click the “Page Optimization” link.

On the first tab “CSS Settings” follow the settings:

  • CSS Minify: ON
  • CSS Combine: ON
  • CSS Combine External and Inline: ON
  • CSS HTTP/2 Push: ON
  • Load CSS Asynchronously: OFF
  • Generate Critical CSS: OFF
  • Generate Critical CSS In Background: OFF
  • Inline CSS Async Lib: ON
  • Font Display Optimization: Default

After tweaking the settings, click on “Save Changes“.

How Cached Web Pages Are Served

Installing something like the LiteSpeed Cache plugin is a great way to speed up your website. Basically, web pages are served up differently when you have a caching plugin.

When caching is activated, the server stores an HTML file of your web page or pages. Usually, it is stored in the server’s Random Access Memory (RAM), which is very fast.

When a browser requests a web page, the server does not need to perform all the processing talked about above. It simply serves up the page it already has on file, and that leads to much faster page load times.

You might be wondering then what happens when you make changes to your site or add a new post or page. Well, every cache plugin, including LSCache, has a way of dealing with these scenarios. Oftentimes, what happens is based on the settings you are using.

That being said, a cache plugin that has been properly configured on your WordPress website would delete cached versions of your homepage, archives, or other pages you may have set. It would then create new versions of these pages to serve up to future site visitors.

Other pages may remain untouched. Again, this depends on the settings you specify.

There Are (at Least) Two Types of Caching

The most common types of caches are browser and server. Browser caching is, as you might expect, done on the visitor’s end. It involves a browser cache like that in Chrome.

Then you have the server-side caching, like LSCache. That’s done on the website server.

Let’s take a look at some of the differences between the two.

Browser Caching: This allows your browser to store files from sites, especially sites you visit a lot. This way, your browser does not have to retrieve new files every time a website is visited.

Server Caching: Instead of processing every single request, a server takes the results of all the requests and stores them to quickly serve up the saved results.

Is Website Caching Important?

Yes, it is very important. When caching is used properly, your website speed will be dramatically improved, and your overall SEO will improve as well. This is because site speed is something Google takes into account when ranking websites.

Final Thoughts on the LiteSpeed Cache Plugin

As you can see from the sections that we looked at, the LiteSpeed Cache plugin is quite advanced. It takes a bit of digging and learning to take full advantage of what it offers.

That being said, LiteSpeed Cache is probably the best plugin available today for caching. Now that is a matter of opinion, and there are several really good ones out there.

Admittedly, there are some easier to install and manage cache plugin options, including W3 Cache, WP Cache and WP Super Cache, and Autoptimize. But if you are looking for professional functionality and developer-level caching, LiteSpeed is perfect for you.

And one important note before we go: if you decide to run a different caching plugin, disable LiteSpeed Cache. Never run more than one caching plugin on your WordPress website.

Let us know how LiteSpeed Cache works for you and how you like it. Did you replace a different cache plugin with this one? Do you prefer a simpler plugin with fewer options?

If you enjoyed this article, then you’ll love Hivalidity’s WordPress hosting platform. Turbocharge your website and get 24/7 support from our veteran WordPress team. Our Google Cloud powered infrastructure focuses on auto-scaling, performance, and security. Let us show you the Hivalidity difference! Check out our plans.

About the author

Natan Ray

Natan founded HiValidity in 2017 and it's currently growing internationally from the offices in Dehradun, India. The passion for performance has been growing ever since the web started to get slower. HiValidity is part of the remedy. Natan is a serial-entrepreneur, loves startups and has founded a series of companies the last 6 years. The Internet has always been his playground.

Add comment

By Natan Ray

Email Newsletter

Subscribe to receive inspiration, news, and ideas in your inbox.

TENDING