Redis can be used by supported applications such as WordPress to provide fast object caching and improve website performance.
This guide explains how to enable Redis on your cPanel account and configure a WordPress Redis caching plugin to connect to it.
1. Enable Redis in cPanel
Log in to cPanel and go to:
Advanced → LiteSpeed Redis Cache Manager
Enable the Redis service for your account.
Once enabled, Redis will be available through a local Unix socket.
2. Enable the Redis PHP Extension
From cPanel, go to:
Software → Select PHP Version / PHP Selector
Open the Extensions section and enable:
redis
Make sure you enable the Redis extension for the PHP version being used by your website.
3. Configure Your WordPress Redis Plugin
In your WordPress Redis or object-cache plugin (EG LiteSpeed Cache), use the following connection settings, it does require unix sock as the configuration option:
| Setting | Value |
|---|---|
| Host | /tmp/redis.sock |
| Port | 0 |
If the plugin provides additional Redis connection options, these can normally be left at their defaults unless otherwise required.
4. Enable Object Caching
Once the Redis connection details have been entered, use your WordPress caching plugin's option to Enable Redis, Enable Object Cache, or Connect to Redis.
The plugin should then report that it has successfully connected to Redis.
Troubleshooting
If WordPress cannot connect to Redis, check the following:
-
Redis is enabled under Advanced → LiteSpeed Redis Cache Manager in cPanel.
-
The redis PHP extension is enabled under Software → PHP Selector.
-
The Redis host is set to
/tmp/redis.sock. -
The Redis port is set to
0. -
The PHP version selected in PHP Selector matches the version being used by the website.
If Redis still cannot be enabled after checking these settings, please contact support.