Articles on: LiteSpeed

How to Install & Enable LsCache Plugin for WordPress

LiteSpeed Cache (LSCache) is a built-in, high-performance dynamic content acceleration feature of the LiteSpeed Web Server.


What is LiteSpeed Cache for WordPress?


LiteSpeed Cache for WordPress (LSCWP) is a PHP-based plugin that provides page caching and other site optimization features, which deliver superior performance to your WordPress site.

ServerFreak shared servers are configured with LiteSpeed web server technologies so that your websites will get all the benefits like superior performance and value. Click here for our powerful WordPress hosting server powered by LiteSpeed!

Because LSCache (LiteSpeed's cache module) is built directly into the server, overhead is significantly reduced and caching can be done more efficiently than with other PHP-based caches.

LSCWP supports WordPress Multisite and is compatible with most popular plugins, including WooCommerce, bbPress, and Yoast SEO.

Here's how to install LiteSpeed Cache for WordPress plugin in simple step-by-step explanation:


Login to your WordPress Admin Dashboard and click on Plugins >> Add New




Search for "LiteSpeed Cache Plugin" in search bar. The WordPress will fetch plugins list including LiteSpeed Cache.

Click on Install Now and then click on Activate button to activate the plugin.



Return to your WordPress Dashboard and click on LiteSpeed Cache > Settings




By default, the caching function has been enabled as highlighted below provided if you've installed the latest version of LiteSpeed Cache plugin (v 2.4.1 and above).

To turn on caching, navigate to LiteSpeed Cache > Settings > General and set Enable LiteSpeed Cache to Enable.




Click "Learn More" as shown above if you need to learn the rest of the Advanced features.
Note: We highly recommend the basic setup which suits for 90% of the WordPress installations. Use advanced features only if you know what you are doing.


Basically, we have completed this tutorial for LSCache Plugin for WordPress. If you have followed step 1 to 5, you're completely done with the configuration setup already.


Note: Unless you know what you're doing, you can tinker with the Basic View Configuration & Advanced View Configuration settings further. We shall include the description for both Basic & Advanced Configurations below just for your further knowledge.


Note: To verify whether LsCache has been enabled for your WordPress, please scroll down to the bottom of this page for full instructions

Basic View Configuration & Its Explanations:



Let’s look at the first four tabs in the Settings section, and see what they do. These are the most basic settings for your cache, and the only tabs that are visible in Basic View.


General


The first option on the General tab turns the caching functionality on and off. The remaining settings define the parameters for the expiration of different types of content in the cache.

TTL stands for “Time to Live” and it refers to the number of seconds a page can remain in cache before it is considered stale. Once a page reaches its TTL, it is purged from cache. We’ve chosen default TTL’s that should work for most sites, but you are free to change them.


Cache


This tab allows you to decide what types of content will be cached. By default, everything is enabled. If you don’t know what these settings do, it’s best to leave them set to their defaults.


Purge


There are sometimes situations where pages should be purged before their natural expiration. This section allows you to define the rules for that behavior. The default selections should work for most sites, but you can change them if you need to.

For instance, when you write a new post, tag it “brownies,” and publish it in the “recipes” category, several pages will change: the home page, the recipes category archive page, the brownies tag archive page, your author archive page, and probably some other pages, depending on your theme.

All of the affected pages will need to be purged in order to avoid serving stale content. These settings give you an opportunity to adjust the rules to fit what is needed by your site.


Excludes


You may have pages that you don’t want cached at all. These options allow you to exclude specific parts of your site from being cached. Again, for most sites, there will be no need to change these settings. They are provided to allow you to make custom exceptions to the cache rules.


Advanced View Options


The remaining tabs are for more advanced settings. You don't need to venture onto these pages, unless you have a specific reason to do so. Just the same, let's look at what they do on a basic level, and link to more information where appropriate.




Click Advanced View at the top of the Settings page, if you don't see these additional tabs.

These settings tabs fall into two categories: those that are related to the operation of LiteSpeed’s cache, and those that relate to other types of site optimization.

ESI


ESI stands for “Edge Side Includes” and is a method through which you can “punch holes” in public content, and fill them with private or uncached content.


Advanced


As you might guess from the name of this tab, it’s aimed at more experienced users. You are not likely to need this tab, unless you have some kind of conflict with another cache plugin. ​


Debug


This isn’t a tab you’re likely to use just for fun, unless you’re into examining logs. If you’re having trouble with something, we may suggest you visit this tab and flip a couple of switches so we can better see what is going on.


Crawler


The crawler is disabled by default. When it’s active, it travels your site, refreshing any pages that may have expired from the cache. Crawling can be a resource-intensive process, and not all hosting providers will allow its use.



Optimization Settings




Optimize


There are several other measures you can take to speed up your WordPress site, and many of them are supported in this tab. CSS and Javascript minification and combination, HTTP/2 push, asynchronous and deferred load… if you don’t know what these things mean, don’t worry. They are disabled by default.


Tuning


Among other things, the Tuning tab gives you an opportunity to further refine the settings you selected in the Optimize tab. For instance, you may want to minify all of your CSS, except for one particular style sheet. You can list that CSS as an exception on the Tuning tab.


Media


Another way to optimize your site is by making images less of a burden to transmit. LSCWP supports two methods of achieving this: Lazy Load, and Image Optimization. Both are disabled by default, and configured on this page.


CDN


This tab allows you to configure your Content Delivery Network for use with WordPress. If you don't use a CDN, don’t worry about it. CDN support is disabled by default.



Verify Whether LsCache Plugin is Working for Your WordPress:



You need 2 web browsers on your PC to make this method work (e.g. Google Chrome and Firefox). You can verify a page is being served from LsCache plugin through the following steps:

Assuming using Google Chrome as your non-logged-in browser , click on More Tools > Developer Tools (Alternatively, you can use the shortcut key Ctrl+Shift+I). Open the Network tab.

Refresh the page.

Click the first resource (this should be an HTML file and the resource's headers should appear as in the image below). For example, if your page is http://example.com/wordpress/, your first resource should either be something like example.com/wordpress/ or wordpress/.




In a different, logged-in browser e.g. Firefox, in your WordPress Dashboard, navigate to LiteSpeed Cache > Manage and click the Purge All button.

Reload the page in the first (non-logged-in) browser e.g. Google Chrome and select the same resource again. If you see headings similar to the one below



(for example), this means the page had not yet been cached, but that LiteSpeed has now stored it for future use.

Reload the page a second time and you should see X-LiteSpeed-Cache: hit in the response header. This means the page is being served by the cache and LsCache Plugin is configured correctly.




Need lightning speed feature for your hosting account today?

Wait no further. Click here for our powerful WordPress hosting server powered by LiteSpeed!

Updated on: 15/04/2019

Was this article helpful?

Share your feedback

Cancel

Thank you!