How to use LiteSpeed cache plugin for WP

Contents

1. Installing the plugin
2. Starting Memcached process & plugin configuration
3. QUIC.cloud setup
4. Memcached service on a VPS server *

Over the past couple of months, we are migrating our shared servers over to a LiteSpeed Web Server environment instead of the previously used Apache Web Server environment.

With that new hosting environment, our FastCloud Extra customers can benefit from the LiteSpeed Cache (LSCache) which is a built-in, high-performance dynamic content acceleration feature of LiteSpeed server products. It comes with many features in place, like Brotli Compression, including HTTP/3 and QUIC support, LSCache Engine with ESI, etc. It is an Apache drop-in replacement and fully supports configurations done through .htaccess rules. This means that the only change you will notice for your websites is related to better performance.

With regards to using WordPress, LiteSpeed Premium Caching can be easily integrated with WordPress websites for an additional boost in performance. This is achieved using LiteSpeed Cache for WordPress (LSCWP), an all-in-one site acceleration plugin, featuring an exclusive server-level cache and a collection of optimization features.

You can find all available LiteSpeed caching solutions for different applications on the following link: > https://litespeedtech.com/products/cache-plugins

You can easily install and configure the LSCache plugin for WordPress following the steps below.

N.B.: Any other caching plugins, such as WP-Rocket, WP Fastest cache and W3 Total Cache should be removed prior to using the Litespeed cache plugin in order to avoid conflicts.

Installing the plugin

  1. Installing the cache plugin can happen via the following methods:
  • WP Dashboard backend -> Plugins -> Add New -> Install / Activate LiteSpeed Cache plugin
  • cPanel Terminal / SSH console -> home directory of the WP instance -> following WP-CLI command:

wp plugin install litespeed-cache --activate

  1. Next step is to head to the cPanel -> LiteSpeed Web Cache Manager tool and the LiteSpeed Cache Management or WordPress Cache

There you can Scan your hosting account for WP installations with the LSCache plugin and make sure they are Enabled



Using the Flush All button in the cPanel’s LiteSpeed Web Cache Manager you can clear the cache of ALL your LSCache-enabled sites, even those using a different CMS. To flush LSCache for a single site, please do so directly in the site’s admin dashboard.

Once configured, you can confirm that LSCache is working for a domain on the following URL: -> https://check.lscache.io/

or

N.B.: Be sure to check that Litespeed Cache -> Cache and Enable Cache shows ON

Starting the Memcached process


This process can be started and Memcached connected by our Technical Team, however, with access to the Additional Tools > Memcached in our Dashboard, we can now start the process by running a check for the Memcached on the client’s account.

First, make sure that the Memcached PHP extension is enabled in the Select PHP version tool for the appropriate PHP version:

Note: this warning might appear -> igbinary enabled as dependency (memcached) 

Once this is confirmed, you can use the Additional Tools > Memcached tool via the Dashboard and check if the process is started for this cPanel user and which port it uses:

You can now enter the relevant port in the WP Admin backend > LiteSpeed Cache > Cache > Object and make sure to save the settings, so you can see the connection test is passed.

QUIC.cloud setup


If you wish to enable the QUIC.cloud option, head to your WordPress Dashboard backend -> Litespeed Cache plugin -> General and connect your QUIC.cloud account via a Domain key. This also gives you access to the QUIC.cloud CDN

Purging the cache on this particular website can happen via the Toolbox:


Memcached service on a VPS server *

The memcached service could also be working on a VPS plan, as in this scenario it would use the default 11211 port. Sometimes after a server reboot it would not start automatically and it needs to be restarted. You can use the following command to check its status:

service memcached status

or this command to restart it if Inactive:

service memcached restart

admin has written 166 articles