If you deploy a WordPress site on a server running OpenLiteSpeed tech stack, the LiteSpeed Cache plugin will be installed on your site automatically.
LiteSpeed Cache provides you with real-time data on your page load time and PageSpeed score, enabling you to monitor your site’s performance and make adjustments as needed. You can also enable guest mode to allow visitors to enjoy the benefits of LiteSpeed Cache without logging in.
In addition, LiteSpeed Cache gives you access to advanced features such as:
- Public and private cache
 - Object and browser cache
 - Critical CSS
 - Unique CSS
 - Low-quality image placeholder
 - Viewport image.
 

LiteSpeed Cache comes with powerful presets built in. With a single click, you can choose one of four presets to configure your website: Essentials, Basic, Advanced, and Aggressive.
Each preset enables a set of features suitable for different levels of optimization and risk. The higher the optimization level, the more features are enabled, but also the more likely you are to encounter conflicts or issues.
To use a preset, simply click on the Apply Preset button next to it. You can also import or export your own presets using the Import / Export tab.

If you see some inconsistent behavior, you can purge the existing cache. Purging the cache means deleting the cached copies of your web pages or files, so that they can be regenerated with the latest changes. This can be done from within the WordPress dashboard itself. You can purge the cache by clicking the appropriate button, depending on what you want to clear.
You can also purge the cache using specific criteria, such as category, post ID, tag, or URL.
Enter one or more values in the text box at the top of the Purge tab in your LiteSpeed Cache Toolbox, and click on Purge List. For example, you can enter a category name to purge all the pages under that category.

For more information about purging cache and how it works, you can visit the LiteSpeed Cache documentation.
How to Increase Browser Cache TTL for Static Files
To improve your website’s performance and achieve better scores in speed testing tools, you can instruct browsers to cache your static files for a longer period.
By default, OpenLiteSpeed (OLS) often sets a short cache duration for static assets. The following steps show you how to increase this to a longer duration.
- Navigate to your web application’s or virtual host’s configuration file in OpenLiteSpeed and locate the expires configuration block. The default block typically looks like this:
 
expires {
  enableExpires           1
  expiresByType           image/*=A43200,text/css=A43200,application/x-javascript=A43200,text/javascript=A43200,font/*=A43200,application/x-font-ttf=A43200
}- In the above code snippet, we can see the access times for each asset type. The letter ‘A’ in values like A31536000 stands for “Access time.” It specifies that the cache duration (in number of seconds) should be calculated from the moment a user’s browser first requests and accesses the file, not from the file’s last modification time on the server.
 - To increase the TTL duration, you need to replace 
43200with the updated value from the list below:- 1 day: 
86400 - 1 Week: 
604800 - 1 Month: 
2628000 - 1 Year: 
31540000 
 - 1 day: 
 - For example, if you want to set the expiration dates to one year, then your configuration should look something like this:
 
expires { enableExpires 1
expiresByType image/*=A31540000, \ video/*=A31540000, \ font/*=A31540000, \ application/x-font-ttf=A31540000, \ application/font-woff=A31540000, \ application/font-woff2=A31540000, \ application/javascript=A31540000, \ application/pdf=A31540000, \ text/css=A31540000, \ text/javascript=A31540000, \ image/vnd.microsoft.icon=A31540000}
- Once you have made the necessary modifications, click on the Update Config button.