Using Redis object caching with WordPress

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

How-to guideAdvanced2 min readUpdated

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 then 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

Popular

Tip: press / to search from any pageSee all results