Using Redis object caching with WordPress

Turn on Redis for your account and connect WordPress with an object cache plugin, then confirm cache hits.

Guide2 min readLast updated
On this page
  1. 1. Enable Redis in DirectAdmin
  2. 2. Connect WordPress
  3. 3. Confirm it works
  4. When it helps
  5. Common questions

Redis stores the results of database queries in memory, speeding up dynamic pages and wp-admin that page caching can’t help.

1. Enable Redis in DirectAdmin

Open Advanced Features › Redis and enable it. Note the connection details shown — usually a Unix socket path for your account.

2. Connect WordPress

Install a Redis object cache plugin and configure it with the socket path. With many plugins this is set in wp-config.php, for example:

define('WP_REDIS_SCHEME', 'unix');
define('WP_REDIS_PATH', '/home/USERNAME/.redis/redis.sock');

Use the exact path DirectAdmin shows.

3. Confirm it works

The plugin’s status screen should show Connected and growing hit counts.

When it helps

Logged-in users, shops, membership sites and busy admin areas. For a simple brochure site, page caching alone is usually enough. Caching WordPress on shared hosting

Common questions

Should I use Redis object caching?

It helps database-heavy sites — a busy WordPress site with WooCommerce or many plugins — by keeping repeated database results in memory. For a small brochure site, page caching alone gives you nearly all the benefit with less to configure.

Spotted something out of date or unclear? Tell us and we’ll fix it.

Keep going