Use Redis object caching without LiteSpeed Cache
Set up Redis object caching on a WordPress site that uses a caching plugin other than LiteSpeed Cache, using the Redis Object Cache plugin.
Enable Redis object caching on a WordPress site that does not use LiteSpeed Cache. Applies to shared, reseller and Premium hosting.
If you do use LiteSpeed Cache, it has object caching built in and you do not need a second plugin — see Enable Redis object caching instead.
LiteSpeed Cache is the recommended caching plugin on WebGee. It talks directly to the LiteSpeed web servers your sites run on, which no other plugin can do. This article is for sites already committed to a different caching plugin.
1. Enable Redis in cPanel
-
In cPanel, open Redis.
-
Select Enable Redis.
-
Copy the socket path shown. You need it in step 3.

You can return to this page at any time to see it again.
2. Enable the PHP extension
- In cPanel, open Select PHP Version.
- Select Extensions.
- Tick redis.
3. Install and configure the plugin
-
In WordPress, go to Plugins → Add New.
-
Search for Redis Object Cache — the one by Till Krüss.
-
Select Install Now, then Activate.
-
Edit
wp-config.phpand add the socket path from step 1, above the line that reads/* That's all, stop editing! */:define( 'WP_REDIS_SCHEME', 'unix' ); define( 'WP_REDIS_PATH', '/home/cpaneluser/.redis/redis.sock' ); -
In WordPress, go to Settings → Redis and select Enable Object Cache.
Check it worked
On Settings → Redis, the status should read Connected.
If it does not:
Connection refused— Redis is not enabled. Re-check step 1.Class 'Redis' not found— the PHP extension is off. Re-check step 2.- The socket path is wrong. Copy it again from cPanel → Redis; it is regenerated whenever Redis is disabled and re-enabled.
If you run several WordPress sites on one account
Redis Object Cache uses the WordPress database table prefix as its cache key prefix. Two sites sharing a prefix will share cache entries, and each will start serving fragments of the other — usually seen as the wrong site name, wrong menu or wrong post content appearing at random.
This only happens when all of the following are true:
- The sites were installed manually rather than through Softaculous, which assigns a unique prefix automatically.
- Two or more of them use the same prefix, typically the default
wp_. - More than one has Redis Object Cache active.
To fix it, give each site a distinct table prefix, or set a distinct cache key
prefix per site in wp-config.php:
define( 'WP_REDIS_PREFIX', 'site1_' );Deactivating the plugin resolves the symptoms immediately while you sort the prefixes out.
Related
Send WordPress email over SMTP
Configure WP Mail SMTP to send WordPress email through your WebGee mailbox, so contact forms and order confirmations stop landing in spam.
Fix "missing the MySQL extension" in WordPress
Enable the nd_mysqli PHP extension so WordPress can reach its database, and resolve the utf8mb4 client library warning in Site Health.