Updated on Mar 7, 2024
Welcome to our tutorial about the LightSpeed Cache plugin for WordPress. We will discuss everything you need to know about one of the best caching plugins for WordPress, from what LiteSpeed is to how to install the plugin and configure it. There is a lot to talk about, so let’s begin with LiteSpeed itself—what it is, what it does, and how to use it with our hosting services.
You Will Read About:
The term LiteSpeed is generally used to refer to the proprietary web server software of the same name. If we use one word to describe the LiteSpeed web server, that would be performance. Of course, it is also a highly secure and customizable software. Still, as the name suggests, its main upside is high performance and efficiency. It can easily handle thousands of concurrent connections while maintaining a small memory footprint. Since LiteSpeed is a web server, there can typically be only one such running on a machine. That is why LiteSpeed is a drop-in replacement for Apache and a solid alternative if you want your WordPress websites to really zoom along.
Those were just some of the major features LSWS offers. We wish to avoid burdening this tutorial with details about the web server itself. This was so you could familiarize yourself with it, but we will focus on the caching side of it later.
All of our FastCloud Extra Shared Hosting plans use the LiteSpeed web server. All our customers will feel the benefits of this web server when purchasing that hosting plan. Additionally, it is available as an upgrade for all our private (VPS and DS) servers. We chose LiteSpeed for our services because not only does it seamlessly integrate with cPanel – which all our hosting plans use – but it is also the best-performing web server for our needs. It is a popular choice that has been tested over time and remains among the best on the market. Not only that, but it is an actively maintained product, which is precisely what we wanted. Previously, we were using Cachewall, but that was deprecated, and we all know relying on such software is a ticking time bomb.
We have written an extensive blog post about why LiteSpeed is part of our repertoire, and some of its advantages are from our point of view. We strongly encourage you to give it a read, as it may provide you with some invaluable insights about the web server and our thought process behind it.
It is now time to introduce the main star of this tutorial: LiteSpeed Cache. As this is ultimately a WordPress tutorial, we will focus on that aspect of LiteSpeed Cache. Nonetheless, what will be discussed here can also be applied to the other LiteSpeed Cache plugins. Firstly, what is LiteSpeed Cache?
As we mentioned in the previous part, the LiteSpeed web server comes with its own caching engine, the LiteSpeed Cache. But what does that engine do differently than other caching engines? We are glad you asked!
We are all aware of what caching is: a mechanism for storing data so that it is easier or faster to retrieve than the source. In other words, data is saved for later use and ease of access. We also know that dynamic elements in a web page don’t actually live on the system. They are built on demand, and that is why they are called dynamic. However, that process can be slow and resource-intensive. Since LSCache is considered a “page cache,” it saves those dynamic web pages as HTML files and then serves those when requested. That is much faster and less taxing on the server.
How it works is if LSCache is enabled and a visitor requests a page that has not been cached, LSCache returns a “cache miss.” That tells the web application to dynamically generate that page as static HTML, which LiteSpeed then servers to the visitor. Finally, LiteSpeed also stores the page in its cache. The purpose of that is so that the next time the same page is requested, it can serve it to the user instead of generating a whole new one. That is called a “cache hit,” which is, as we mentioned, much more efficient and fast. This process eliminates the web application from the picture. The browser no longer has to wait for the app to generate the page.
But how do you use this marvelous LSCache? There are two ways: through rules in the .htaccess file and via plugins. In this tutorial, we will focus on the WordPress plugin, but feel free to explore the documentation we linked for the rules or other plugins.
Finally, if you want to learn more or join the LiteSpeed community, head to their dedicated forums.