How to configure the Redis with Litespeed Cache plugin in Wordpress

LiteSpeed Cache, it is a WordPress plugin has its own cache bindings and overwrites all caching methods. Have in mind that Redis cache WordPress plugin will not work as you expect. You'll need to set the Redis connection settings in Litespeed Cache in this URL:

wp-admin/options-general.php?page=litespeedcache#advanced
There you can input your Redis info like IP, port, and authentication key. You can now disable the WP Redis Plugin .


How to set up LiteSpeed Cache in WordPress (steps to do it right):


  • Open your WordPress admin panel.
  • Find, install and activate the LiteSpeed Cache plugin.
  • Go to section LiteSpeed Cache → Cache, open the tab Cache (the first tab of the menu) and make sure the switch is opposite Enable Cache is in position ON (if not, enable it and save changes by pressing Save Changes):

    LiteSpeed Cache Plugin Enabled

  • On the same tab you are at, similarly enable the required caches and specify their settings.
  • Go to Object tab. Than Object Cache → ON.
  • If you have an additional service like Memcache(d) or Redis, the object cache can be configured. In our case this is Redis (choose Redis Button) and fill out the fields the way it is presented:
  • Put /home/user/.redis/redis.sock, where user is your username of the hosting account.
  • Set Port to 0 (in some cases 6379) and choose Default Object Lifetime.

    Redis Cache Enabled

  • Check the site is working.


How to set up Redis in WordPress on shared Nginx plans:


  • Open your control panel (DirectAdmin or cPanel) and go to PHP Settings.
  • See if Redis function is checked.


Redis Function in PHP Settings

  • Go to your wp-config.php file in your WordPress website and start editing it.
  • Add the following line ot codes

define('WP_REDIS_PORT', '0');
define('WP_REDIS_PATH', '/home/user/.redis/redis.sock');
define('WP_CACHE_KEY_SALT', 'zerno.co');



Redis WordPress Config File

- user stands for your username of your hosting account with CooliceHost.

You are ready to go!


Was this article helpful?

mood_bad Dislike 8
mood Like 35
visibility Views: 10552