The Ideal LiteSpeed ​​Cache Plugin Settings For WordPress

0

LiteSpeed ​​Cache or often referred to as LSCache is a caching module server built directly on the LiteSpeed ​​web server. LSCache saves  the static HTML page which are collected dynamically in order to speed up the presentation of these pages in the future. Originally, LSCache was created by rewrite rules and configuration files. This requires the user to have some knowledge of their backend server or contact their hosting provider to set up caching on their website. The main problem is the inflexible rewrite-rule caching. Therefore, if they want to avoid presenting old content, the website owner will not have the ability to do purge at will and they can only do caching for a few minutes each time doing it.

Configure LiteSpeed ​​Cache Plugin for WordPress

Our beta testing results for the WordPress website itself have proven that LiteSpeed ​​Cache Plugin helps  to increase page loading speed and is more efficient than other cache plugins ( WP Fastest Cache , WP Super Cache , or W3 Total Cache ) especially when handling high amounts of traffic.

Well, in this article we will discuss more about the LiteSpeed ​​Cache Plugin for WordPress.

Why To Use LiteSpeed ​​Cache Plugin for WordPress?

There are many advantages that you can get by using LiteSpeed ​​Cache Plugin on your WordPress website :

  • Full page caching is done at the server level so it can be processed more quickly and efficiently.
  • CSS, JavaScript, or HTML Minification and Combination
  • Browser Cache Support
  • Object Cache with Redis
  • Edge Side Includes (ESI)
  • Lazy Load Images
  • HTTP / 2 Push
  • Image Optimization
  • Database Optimization
  • And various other advanced features

For those of you who use bluehost hosting plans, the LiteSpeed ​​Cache plugin can be enabled on your WordPress website. If not, you can manually install the plugin via WordPress Plugin Directory.

We have searched many blog about litespeed cache capacity. Most of the site mentioned positive ratings about litespeed. That’t the way we came to know more about litespeed, After that only we have implemented in our site. Honestly that’s awesome cache plugin for any sort of site that your using. Here are the result of litespeed cache plugin.

wpsuper cache vs litespeed cache

Also Read: How To Reduce Bounce Rate In WordPress

How To Configure LiteSpeed ​​Cache Plugin Settings for WordPress

After you install and enable the LSCache plugin on your WordPress website, you may be confused how to configure it? You do not need to worry because we will discuss how to configure your LSCache plugin so your plugin can work optimally.

LiteSpeed Cache Plugin

Once you activate LSCache, you may be aware that everything is still disabled. To start caching, choose 

LiteSpeed ​​Cache> Settings> General> Enable LiteSpeed ​​Cache and then select Enable.

Now we will discuss each tab in the Settings option in LSCache to make it easier for you to set it up.

General

In this tab, the first thing you can do is turn on and off caching. Other settings in this tab are used to define the expiration parameters of different types of content in the cache.

TTL (short for Time to Live) is the length of a page will remain cached before LSCache considers the page as expired. When a page has reached its TTL, the page will be purge or removed from the cache. Default settings from LSCache are guaranteed to work for many websites, but you can certainly change them.

Configure LiteSpeed ​​Cache Plugin for WordPress

Enable LiteSpeed ​​Cache

Default Setting: Enabled – the plugin will cache the pages of the website.

Other options:

  • Disabled – Eliminates the cache of all cache entries on the current website and stops caching in the future.
  • Use Network Admin Setting -Uses one of the two previous options that have been selected by Network Admin. This can only be done on multi-site websites.

Default Public Cache TTL

This TTL setting controls most pages on the website. Another TTL is for specific page and website type pages.

Default Setting: 28800

Constraints: Must be more than 30 seconds

Customization: The default value is 8 hours. Other values ​​you can use are 1 hour (3600), 1 day (86400), 1 week (604800), or any other number you want. If your website has pages that will not change much, the older TTL will be better.

Default Private Cache TTL

This TTL sets how long it takes to cache private pages.

Default Setting: 1800

Constraints: Must be between 60 and 3600 seconds

Customization: The default is 30 minutes. The longest time you can enter for this TTL setting is 1 hour.

Default TTL Front Page

This TTL setting controls the front page. Keep in mind that this may be affected by is_front_page () or any third party plugins that have chosen to use the TTL front page on one of their pages (e.g. WooCommerce shop page )

Default Setting: 1800

Constraint: Must be more than 30 seconds

Customization: The default setting is 30 minutes. In addition, the main page is also the most visited page of people. For this reason, it’s a good idea to use a shorter TTL of your time. But if you do not update the main page of your website too much, the older TTL will not be a problem.

Default Feed TTL

This one TTL organizes your website feed. Feeds on websites are one of the things that help your website visitors stay up-to-date with the content on your website, but usually they need time intervals to retrieve data from your blog. Withdrawal of this data can cause constant loading on the server. Caching on the feed page can reduce this load and LSCache will purgin on updates and soldiers in the feed page to stay up-to-date.

Default Settings: 0 – Do not cache feeds

Other options:

  • Below 30 – Will be set to 30 seconds
  • Above 30 – Will be set to the number you set

Default 404 TTL

This TTL manages a page showing 404 results. This could be a random URL accessed by website visitors or 404 intentional. Essentially all websites that issue 404 results will use this value.

Default Setting: 3600

Other options:

  • 0 – LSCache will not cache page 404
  • Below 30 – will be set to 30 seconds
  • Above 30 – will be set according to the number you enter

Customization: The default value is 3600 or 1 hour. If 404 is a common thing, then it’s good to cache for a short period of time. If the 404 page is intentional, then it’s a good idea to cache a page for a longer time because it’s a visit you know you’ll get. This can affect disk usage negatively.

Default 403 TTL

This TTL controls the pages that generate 403 pages.

Default setting: 3600

Other options:

  • 0 – Not cache 403
  • Below number 30 – will be set to 30 seconds
  • Above number 30 – will be set according to the number you enter.

Customization: The default value for this TTL is 3600 or 1 hour. 403 results are usually deliberate, so there’s nothing wrong with having a longer TTL time for this setting.

Default 500 TTL

This TTL regulates the 500 Internal Server Error results .

Default Setting: 3600

Other options:

  • 0 – does not cache 500 Internal Server Error
  • Below number 30 – will be set to 30 seconds
  • Above number 30 – will be set according to the number you enter

Customization: The default value is 3600, for 1 hour. HTTP 500 error itself is more severe than 404 or 403. Caching for this page can cause problems in your WordPress website.

Cache Settings

You can use this tab to determine what kind of content you want to cache. By default, all types beside Object Cache and Browser Cache are flashing instantly. This is because object caching and browser caching are not native functions of LSCWP, but other caching types are supported by LiteSpeed. If you do not understand about these settings, you can also use their default settings.

Configure LiteSpeed ​​Cache Plugin for WordPress

Logged-in Users cache

This option is used to present logged-in users with data from private cache. For logged-in users, this is usually private or not at all. When a user logs in, it is possible that each page has private content and therefore they can not be presented from the public cache.

Default setting: ON – content for logged users will be cached privately with session id.

Other options: OFF – logged-in users will not be cached.

Cache Commenters

This option can be very useful if your WordPress uses moderation for comments from website visitors. Turning on this setting also makes commenters unable to see their moderated comments.

Default Setting: ON – the cached version will be displayed

Another option: OFF – comment dropdown will not see the cached page

Cache REST API

This option allows you to cache requests made by the WordPress REST API. If you do not know what the REST API is, then you probably do not need it. If you are not using the API, turning on caching will not adversely affect. You can use the API, turning on caching can help give faster loading times.

Default Setting: ON – REST API will be cached

Another option: OFF – REST API will not be cached

Cache Login Page

This option will cache the login page. There is usually no reason to turn this option off. If there are private data appear on the page, you may want to turn this option on.

Default Setting: ON – The login page will be cached

Other options: OFF – Login page will not be cached

PHP Resources cache

This option will cache the PHP resources loaded by the website theme. In general, this is actually a CSS or JavaScript resource that is loaded through PHP. In many cases, they provide static output, and there is no reason to load PHP any time. If the output is, in fact, dynamic, turn off this option.

Default Setting: ON – PHP Resources will be cached

Another option: OFF – PHP Resources will not be cached

Mobile Cache

This option will allow users to display separate HTML for mobile and desktop views. Ordinary website owners use this for unresponsive themes, but they can also be used when the theme loads different widgets according to the browser type. If you use responsive website themes and there is no difference between the content being removed from mobile and desktop, then you do not have to cache for different mobile views.

Default Settings: OFF – Different mobile view will not be enabled

Other options: ON – Different mobile displays will be enabled

Note: If you turn on this caching, its Mobile View User Agents list can not be empty.

List of Mobile User Agents

If you turn on a different mobile display, this box will be turned off. But if you choose enabled, you need to enter a rewrite-rule-friendly list of user agents.

Default Settings: Mobile | Android | Silk / | Kindle | BlackBerry | Opera \ Mini | Opera \ Mobi

Customization: Most likely you will not need to change this setting. If you want to add another user agent that requires mobile view, add them to the above settings. Each agent must be separated with a |

Private Cached URLs

Sometimes you have pages that should not be cached publicly, but ok to cache privately. List the URL here. Enter the path, one per line, which will be cached privately. LSCache will treat the path as a partial string and compare it to the URL.

To make exact matches, add $ to the end of the path, like for example / category / marketing $.

To indicate the start of the path, add a ^ to the beginning of the path, such as ^ / categories / marketing

Example:

Category / marketing will match with / blog / category / marketing / emailmarketing, category / marketing / contentmarketing, and category / marketing.

/ category / marketing $ will only match the / category / marketing

^ / category / marketing will match the / category / marketing / emailmarketing and / category / marketing.

Default Setting: Empty string.

Purge Settings 

Sometimes, there are situations where you want to purge to multiple pages before they expire. This section allows you to set rules for the activity. The default rules are also workable for most websites.

Configure LiteSpeed ​​Cache Plugin for WordPress

Purge All on Upgrade

This option indicates whether to clean all pages when an upgrade is performed on the installed plugin. The plugin version updates make changes between versions, and it’s not easy to predict whether these changes will affect the content of the page. You shouldn’t change any setting its strongly recommended.

Default Setting: ON – the page will be purge

Another option: OFF – cache will remain the same

Auto Purge Rules For Publish / Update

When an author publishes or updates a post, additional pages may change. The list of categories, tag list, blog front page, and various archives can also change. For example, when you write a new post, then you tag “brownies,” and publish them in the “recipe” category, some pages will be updated: homepage pages, prescription category archives, brownie tags archive pages, your author’s archive pages, and possibly some other pages, depending on your theme.

LSCache must clean all affected pages to avoid serving expired content. This setting gives you the opportunity to customize the rules to fit your website needs.

There is an option for All Pages, which is disabled by default. Enabling this ignores all other checkboxes. Selecting the All pages option makes sense if you do not enable ESI and you have a dynamic post-related widget displayed on each page. (ESI is one of the advanced options that are disabled by default.)

Scheduled Purge URLs

You can choose to automatically remove the list of URLs at a certain time. This is not necessary under normal circumstances. The advanced cleaning rules of LSCWP are capable of handling most situations. However, if you have content generated by outside sources, for example, you may want to clear the relevant pages every day to ensure the outside content is displayed correctly.

Default Setting: Empty string

Other options: URL list (one line one URL)

Scheduled Purge Time

Use this field along with the above. If you have provided a list of URLs to remove, specify how often they should be cleaned in this box.

Exclude Settings

You may have pages that you do not want to cache at all. This option lets you exclude certain sections of your site from the cache. For most sites, there is no need to change this setting. LiteSpeed ​​provides this option to allow you to make specific exceptions to the cache rules.

Configure LiteSpeed ​​Cache Plugin for WordPress

Do Not Cache URLs

This box is used to list unnecessary URLs in the cache. Each URL will be compared with the server’s URL REQUEST variable to see if the URL you entered matches.

Do Not Cache Query Strings

Enter one URL per line. If you have a special theme that allows you to turn pages into monochromatic colors just by adding a “color = query string” at the end of a URL. You can enter color = purple in the Do Not Cache Query String section if you do not want to cache the page purple. You can also enter color = to indicate that you do not want to cache any URL with a certain color.

Do Not Cache Categories

By default LiteSpeed ​​caches every category of your website. If you have a category of posts you do not want to cache, enter the category slug that you do not want to cache in this box.

Category slug is a string commonly used to represent categories in a URL. So if you have a Content Marketing category and the URL is / category / content marketing, then the slug for the page is content marketing.

Do Not Cache Tags

But you can insert slug tags (one per line) in this box for tags you do not want to cache. Litespeed will detect this by default.

Do Not Cache Cookies

If your website uses cookies that you do not want to cache, put them into this box, one per line.

Do Not Cache Roles

You may not want to include user roles from caching. For example, if you are an admin, and you are testing a new function, you may want to exclude a role administrator from being cached until you have tested the new function.

Also Read: Ultimate Guide to Start WordPress Site [Updated]

What about other settings?

Other tabs are meant for more advanced LSCache users. These tabs fall into two categories: settings related to LiteSpeed ​​cache operations and settings related to website optimization.

Configure LiteSpeed ​​Cache Plugin for WordPress

Setting an Website Optimization:

Optimize

There are several ways you can do to speed up your WordPress website and LSCache supports most of the way in this tab such as CSS and JavaScript minification and combination, HTTP / 2 push, asynchronous and deferred load.

Tuning

This tuning tab gives you the opportunity to set the settings you selected on the Optimize tab. For example, you might choose to do CSS minification except for one of the style sheets. You can enter that CSS as an exception in this Tuning tab.

Media

Another way to optimize your site is to create an image with a bit of load to send. LSCWP supports two methods to achieve this: Lazy Load, and Image Optimization. Its turned by default. You can configure it on this page.

CDN

Using this tab you can configure cloudflare settings easily without additional plugin. If you are using Cloudflare, do not use this option. This is meant for reverse proxy CDN, not a distributed proxy server like Cloudflare. By default this CDN option is already disabled. So you do not have to worry.

Also Read: How To Optimize WordPress Images With Lazy Load

LiteSpeed ​​Cache Plugin for WordPress Supports Object Cache with Redis

As mentioned earlier, LSCache for WordPress also supports Object Cache with Redis. Here’s how to enable it:

  1. Login to cPanel
  2. Go to the Select PHP Versions menu – select the PHP version to use
  3. Enable Redis module and click “Save”
  4. Login to WordPress wp-admin
  5. Go to the LiteSpeed ​​Cache menu – click on Advanced View
  6. Go to Settings menu> Cache – Object Cache
  7. Set Method -> Redis
  8. Click “Save Changes”

To read more about Object Cache with Redis on LSCache for WordPress, you can read more on the official LiteSpeed ​​website .

Turn Off Another Caching Plugin If You Are Using LSCache

If you want to use LiteSpeed ​​Cache for WordPress, do not forget to turn off other caching plugins. If you run multiple caching plugins at the same time, this will instead spend more resources on the hosting account. You do not want to use LiteSpeed ​​Cache, you just disable / uninstall it from WordPress.

For a complete guide, you can read the LSCache troubleshooting guide for WordPress on the LiteSpeed ​​website.

Conclusion

Well now you have finished installing and configure everything, you just sit back and enjoy the website with fast loading time. In this article, we’ve covered how you can configure LiteSpeed ​​Cache Plugin for WordPress. If you still have questions, please feel free to leave a comment in the comment field at the bottom of this article. Hope this article useful and help you in doing LSCache configuration for WordPress. We will also continue to discuss the LiteSpeed ​​configuration guide for other CMS-CMS, so wait!

LEAVE A REPLY

Please enter your comment!
Please enter your name here