Configuring Redis Object Caching using Litespeed Cache

What is object caching?

An object cache stores the results of expensive and/or frequent database queries in a way that makes them easy to retrieve, and eliminates the need for repeated access to the database. Object caching greatly reduces the time it takes to retrieve query results.

What is Redis?

Redis (Remote Dictionary Server) is an open source (BSD licensed), in-memory data structure store, used as a database, cache and message broker.

It supports data structures such as strings, hashes, lists, sets, range queries, bitmaps, hyper loglogs and geospatial indexes with radius queries.

In its simplest form, Redis is a caching system that can be combined with MySQL or MariaDB to optimize the application level speed.

How do I enable Redis?

We have a separate guide that covers enabling Redis on your Premium PCI-DSS compliant hosting account (Link opens in a new tab).

How do I enable Object Caching in LiteSpeed Cache?

In order to follow this guide, you will need to be able to access your cPanel account (Link opens in a new tab).
  1. Login to your cPanel account
  2. Navigate to the Advanced section and click Redis Manager
  3. Copy your Socket path as shown i.e. /var/kredis/enableredis/redis.sock
  1. Log In to your WordPress dashboard
  2. Navigate to LiteSpeed Cache and click on Cache

  1. Navigate to the Object menu

  1. Under the Object Cache Settings, change Object Cache from OFF to ON.

  1. Change the Method from Memcached to Redis

  1. In the Host box, paste the socket path you copied earlier.
    1. As Redis runs on a UNIX socket, set the port to 0

  1. Click the Save Changes option at the bottom of the form

  1. Done!


How did we do?


Powered by HelpDocs (opens in a new tab)
© Krystal Hosting Ltd 2002–