Skip to main content

Redis Object Cache Setup in WordPress - Knowledgebase / Website Hosting - Micron21 Knowledge Hub

Redis Object Cache Setup in WordPress

Authors list
  • Binh Pham

How to Enable Redis Object Cache on a WordPress site

This guide covers the process of enabling Redis object caching for a cPanel user on a LiteSpeed web server. It includes enabling Redis via the LiteSpeed WHM plugin, verifying the service is running, and configuring the LiteSpeed Cache WordPress plugin to connect to it.


Prerequisites

  • LiteSpeed Web Server

  • Litespeed WHM Plugin

  • CloudLinux

  • PHP Redis extension enabled


Step 1: Navigate to Cache Redis for Users

  1. Login to WHM as root

  2. In the left navigation, go to LiteSpeed Web Server

  3. Click Cache Redis for Users


Step 2: Enable Redis for the Users

  1. Locate the cPanel username in the list

  2. In the Service MB column, the default is 64MB. Adjust if needed.

  3. Click the Setup Icon (Yellow Box)

  4. It may take a bit to install. Afterward, enable the Redis service on the user by clicking the grey cog.

  5. It should then be enabled with a green play icon


Step 2: Enable Redis Cache in LiteSpeed Cache Plugin

  1. Login to your WordPress admin dashboard

  2. Install LiteSpeed Cache Plugin

  3. Navigate to LiteSpeed Cache > Cache > Object

  4. Set the following settings and then save:

    1. Object Cache: ON

    2. Method: Redis

    3. Host: /tmp/redis.sock

    4. Port: 0

        1. If your Redis extension does not show as enabled, make sure to enable the extension first in your PHP.


Helpful Unhelpful