Introducing LiteSpeed – Your Go-To Website Optimization Tool

Speed is one of the major factors when it comes to a WordPress website’s overall performance. Not only does speed contribute to the first impression your site’s visitors will have, but it also has a direct impact on SEO.

Having a high-performing website also makes it easier to generate conversions. The highest eCommerce conversion rates happen on pages that load within two seconds.

Among many ways to improve website performance, web caching is one of the most effective. With the right tools and techniques, it can reduce server load and improve loading time.

There are different ways to leverage web caching. The easiest one is to install a plugin. LiteSpeed Cache for WordPress (LSCWP) is one of the most popular and effective caching plugins, making it a must-have tool for every WordPress website owner.

This article will cover the most important aspects of LiteSpeed Cache – from its installation and configuration to its features and benefits. Before we delve into the plugin, we’ll discuss the concept of web caching.

What Is Web Caching?

Whenever you visit a site, the browser sends your request to the site’s server. The server then looks for the requested resource and fetches it for the browser to display. Without web caching, this process can take a few minutes to complete.

Web caching is the process of storing static versions of your web pages to serve future requests. Rather than downloading the original files from the server, web caching delivers the cached data. Hence, the web page loads more quickly.

In other words, web caching prevents websites from serving information again to someone who has visited before. This is because the cached data is temporarily stored either in the user’s internet browser or on a web server.

However, even the most powerful tools are not enough for optimized site performance – you also need a reliable web host.

Luckily, every Hostinger plan comes with a LiteSpeed server and the LiteSpeed Cache plugin pre-installed. This combination gives the most out of LiteSpeed and provides an optimized user experience.

Why LiteSpeed Cache?

LiteSpeed Cache for WordPress comes with extensive functionality that simplifies the caching process. It provides server-level page cache technology that works better and more efficiently than PHP-based caches.

Additionally, with server-level caching, your site data is stored in multiple databases. This makes it an excellent choice for boosting the performance of high-traffic websites.

Working alongside a LiteSpeed web server, this plugin can detect cache entries that other plugins cannot and use various tags to manage them. For example, it can serve different types of cached pages based on factors like devices and locations.

Although the cache features are only available on the LiteSpeed server, optimization tools can be used across multiple web servers. These tools include image optimization, CDN (Content Delivery Network) integration, and CSS/JS minification.

Lastly, LSCWP integrates seamlessly with other popular WordPress plugins, such as YoastSEO, bbPress, and WooCommerce.

How to Install and Activate the LiteSpeed Cache Plugin?

Installing and setting up LiteSpeed Cache for WordPress is simple due to how user-friendly it is.

There are several ways to install this WordPress plugin. We will walk you through the steps – starting with installing the plugin from the WordPress dashboard.

Install LiteSpeed From the WordPress Dashboard

LiteSpeed Cache plugin for WordPress

Since the LiteSpeed Cache plugin for WordPress comes pre-installed with all Hostinger accounts, Hostinger users can go ahead and skip this step. In case you’re using a different web host, follow the instructions below to install the LSCache plugin.

Log in to your WordPress dashboard and navigate to the Plugins section. Search for LiteSpeed Cache, click Install Now and Activate.

Plugins section, highlighting LiteSpeed Cache

Refresh the page, and you should see the LiteSpeed Cache section on your WordPress dashboard.

Activate LiteSpeed in hPanel

Log into your hPanel account and navigate to the dashboard. From there, go to WordPress -> Plugins.

Plugins section on the hPanel

The page will present you with a list of installed plugins on your WordPress site. Simply locate the LiteSpeed Cache plugin and toggle the button to activate.

Activating LiteSpeed Cache in hPanel

Activate LiteSpeed in cPanel

Hostinger users that use cPanel hosting plans can also easily enable the LSCache plugin from the dashboard. Navigate to the Advanced module and select the LiteSpeed Web Cache Manager.

Advanced module in cPanel, highlighting the LiteSpeed Web Cache Manager

Once a new window pops up, scroll down to find the LiteSpeed Cache Management section. Then, click the WordPress Cache button

LiteSpeed Cache Management section, highlighting WordPress Cache

It will take you to the LiteSpeed Cache Management page. There, continue by selecting the Scan button.

LiteSpeed Cache Management page, highlighting the Scan button

The system will then scan for active WordPress installations. Simply select the WordPress site on which you want to activate the plugin, and click Enable.

LiteSpeed Cache management page, highlighting the Enable button

On top of everything, LiteSpeed Web Cache Manager uses powerful Smart Purge technology to manage the cache with no hassle.

Check if LiteSpeed Is Enabled

Once you’ve activated the LSCWP plugin, it’s time to double-check if it is working properly. The best way to do this is to check the HTTP response headers – start by opening your browser.

In this example, we are going to use Google Chrome. First, access your site. Then, click on the three vertical dots to open the browser menu. From there, select More tools -> Developer tools.

Google Chrome's Developer Tools option

Another column on the right side of your browser will open. Then, switch to the Network tab, check the Disable cache box, and refresh the site. This will force the server to fetch resources right from the server.

Developer Tools window, highlighting Disable Cache

You will see a list of website elements along with other metrics, such as size and time. Simply click on your domain name and select the Header tab. Scroll down to the Response Header section and expand the dropdown menu.

Response Header section

If LiteSpeed Cache has been enabled, you should see the x-litespeed-cache:hit value as shown above.

How to Configure the LiteSpeed Cache Plugin?

Not only does LSCWP have a wide range of features, but it also provides a flexible interface to customize settings.

The following sections will list the most important settings tabs of the LiteSpeed Cache plugin, along with the steps to configure each of them.

General Settings

First, we have the General tab, where you can opt to automatically upgrade the plugin. Switching the button to On will automatically install updates whenever a new version of the plugin is released.

General settings tab, showing the Automatic Upgrade option

Next, you will find a field to add your domain key – also known as the API key. This component is necessary for using QUIC.cloud services and features. To get the domain key, simply click on the Request Domain Key button.

Request Domain Key button

The system will then review your domain for approval. Once it’s approved, click on the Link to QUIC.cloud button to access all functions. This includes viewing the statistics of your site and using the global content delivery network.

Link to QUIC.cloud button

Further down, there is the Server IP field where you can enter your site’s IP address. By doing so, you will allow the crawler to grab resources from your server to cache directly, speeding up your overall performance.

Server IP settings

Contact your hosting provider for your site’s IP address. Hostinger users can simply access hPanel and go to Hosting -> Manage -> Details.

Lastly, there is a Notification section to toggle. Turning this on will notify you about the plugin’s development, such as promotions, new releases, and beta versions.

LiteSpeed notification settings

Be sure to click the Save changes button to update the settings.

Cache Control Settings

The Cache Settings tab offers various configurations, from enabling automated cache for certain content types to activating browser caching to reduce network resources.

LiteSpeed's cache settings

There are several tab categories under the cache settings tab – we will list all of them along with their main functionality.

  • Cache – provides all cache configuration options to switch on or off. For example, there is a feature to manually set which content types you want to cache – such as favicons, comments, and login pages.
  • TTL (Time To Live) – controls how long particular content types are stored in the cache. All fields come with default values – reduce or increase the numbers as you wish.
  • Purge tab – includes all settings to remove content from cache, which is handy to clear an outdated WordPress cache. You can specify URLs for a scheduled purge from the purge tab or set an automated purge whenever posts or pages are published or updated.
  • Excludes – used to specify which type of content you don’t want to cache. There are several fields for different website elements, including tags and query strings. Simply fill out the parameters accordingly, and the system will exclude them from being cached.
  • ESI (Edge Side Includes) – refers to an advanced caching technique that caches fragments of dynamic web pages, such as admin bars and comment forms. ESI can provide different cached content for certain user roles, including administrators and subscribers.
  • Object – by enabling the object cache, frequent database queries can be retrieved and displayed more quickly. However, since the setup involves configuring technical parameters, it’s better to leave the default values to avoid issues.
  • Browser – activating these settings will automatically store the dynamic content of your site, such as images, fonts, and videos, in users’ browser cache. This way, the server can process fewer requests and serve your pages more quickly.
  • Advanced – as the name suggests, these settings are dedicated to advanced users. Here, you can configure login cookies to avoid conflicts with multiple LSCache installations.

CDN

LiteSpeed Cache for WordPress supports content delivery networks – and this is where you’ll find the configuration settings.

LiteSpeed's CDN settings

The CDN settings tab provides an option to turn on LiteSpeed’s QUIC.Cloud CDN to improve your site’s loading time. CDN mapping option is also available to help specify the closest CDN paths when delivering your web page.

LiteSpeed’s QUIC.Cloud CDN settings

However, the mapping system is only available if you have more than one CDN path. For example, HTML elements are served from one path, while media files are served from another. Additionally, CDN mapping is not necessary for websites with Cloudflare.

If your site uses Cloudflare, simply navigate to the Cloudflare API section to integrate it with the plugin. Doing so gives you access to the Manage tab, where you can find Cloudflare-specific functionality.

Integrating Cloudflare with the LiteSpeed Cache plugin

The Manage tab provides essential information, such as the Cloudflare zone and domain. Moreover, there is a feature to temporarily disable Cloudflare and purge everything from the cache.

Cloudflare's Manage tab

Image Optimization Settings

The LiteSpeed Cache plugin gives users total control over Image Optimization. These settings include an Image Optimization Summary tab that provides metrics about how well-optimized your images are and helps to optimize multiple images at once.

Image Optimization Summary in LiteSpeed

Furthermore, clicking on the Image Optimization Settings tab will reveal various configuration options, from activating auto cron jobs to image WebP replacement. Switching these options on will automate each function.

LiteSpeed's Image Optimization Settings tab

Don’t use other image optimization plugins while using LiteSpeed’s optimization features. Otherwise, you might experience system and processing errors.

Page Optimization Settings

Page Optimization includes multiple setting tabs for the configuration of various tasks, from minifying CSS and JavaScript file sizes to storing Gravatar cache and information locally.

LiteSpeed's Page Optimization settings

Here is the overview of each tab:

  • CSS Settings – includes various options related to CSS configuration, including minification. This process removes unnecessary characters, such as empty spaces and line breaks in the source code to reduce the overall file sizes.
  • JS Settings – has multiple features used to minify, load, and combine JavaScript files to provide optimized performance. The JS Combine feature helps merge multiple files into one, eliminating redundant code.
  • Optimization – provides settings to optimize page elements per your needs, such as specifying JS/CSS cache TTL, prefetching DNS, and removing query strings from static resources.
  • Media Settings – includes the lazy load function to reduce page loading time. Since lazy loading images are not displayed immediately, there is also a feature to set image placeholders.
  • Media Excludes – contains options to exclude specific images from being lazy loaded. Simply specify the parameters, such as class names and URIs, and the system will rule them out automatically.
  • Localization – offers several settings to configure gravatar cache settings and localize external resources. Note that the system will only localize URLs with HTTPS and .js file extensions.
  • Tuning – features options to prevent JS/CSS files from being minified and combined. Additionally, there is a setting to exclude specific roles from any sort of optimization.

Make sure to thoroughly test all page optimization settings before applying them to your site. If any error happens after changing the minify or combining options, navigate to the Toolbox section and select Purge All to restore original settings.

Database

The Database section offers features to help you execute various tasks in your WordPress database more conveniently. This includes clearing old post revisions and trashing pingbacks with a single click.

LiteSpeed Database section

Moreover, DB Optimization Settings control the number of post revisions to clear and automate the process.

LiteSpeed's DB Optimization settings

For example, if you want to save two older revisions for each post, change the Revision Max Number value to 2. Meanwhile, to keep old post revisions for a specific period, change the Revisions Max Age.

Crawler

The LSCache plugin includes a crawler functionality that browses your website’s backend, searching for expired pages and refreshing them in the process. It prevents visitors from seeing any uncached page.

LiteSpeed's crawler functionality

This function is disabled by default and needs to be enabled from the server-side – you have to consult your server admin or hosting provider. This is because activating crawler functionality without sufficient server resources might negatively impact your site’s performance.

However, if you wish to enable the crawler functionality, go to the General Settings tab and switch the respective button to On.

LiteSpeed's crawler general settings

Toolbox

Use the LiteSpeed Cache Toolbox section to configure your cache settings manually. It provides more specific caching functions, from purging 403 error pages to editing the path to the .htaccess file.

LiteSpeed Cache Toolbox section

Although the Purge tab provides straightforward features, other tabs like Edit .htaccess and Heartbeat are meant for advanced users. Thus, it’s best to leave those settings on default or consult with your web host before making any changes.

How LiteSpeed Caches Your Site

Essentially, LiteSpeed Cache works to store a copy of your static pages in a reserved storage location for future visitors. As a result, the server can process fewer requests as it already saved the cached pages.

Here’s an overview of the LiteSpeed site caching process:

  1. A visitor requests a page.
  2. The server receives the request and checks if the page is cached.
  3. If the page is not available in the cache, the server will download the original file and copy a static version of the page for future requests.
  4. The server displays the content to the visitor and stores the copy in the cache.

Now that the page content is cached, future visitors can view the cached version instead, speeding up the response time.

As long as the page stays in the cache, all visitors will be able to view the content within a shorter time. However, if the page is removed from the cache, the whole process will start over from the beginning.

Conclusion

With the LiteSpeed Cache plugin, you don’t have to deal with slow website loading speeds anymore. Paired with the LiteSpeed server, it provides a server-level page cache that can significantly improve site performance.

This tutorial has covered the steps of setting up the LiteSpeed cache plugin on a WordPress site. As you can see, there is a lot to LiteSpeed Cache that you can change and configure.

However, if you don’t feel comfortable with messing around with any of the settings mentioned, simply leave them as they are. Using the default settings of the plugin is more than enough to noticeably boost your site speed.

Author
The author

Nabilla R.

Nabilla is a Digital Content Writer at Hostinger. She has a passion for website hosting and development and is keen to share her knowledge to help people further their online journey. When she's not busy writing, she likes to explore nature and go on adventures.