To enable Redis object caching in WordPress, you’ll need to add the following lines to your wp-config.php file:
define( 'WP_REDIS_SCHEME', 'unix' );
define( 'WP_REDIS_PATH', '/home/<user>/.redis/redis.sock' );
Important:
Replace <user> with your actual DirectAdmin username.
Add these lines just before the last line in the file that includes:
require_once ABSPATH . 'wp-settings.php';
Once saved, reload your WordPress admin dashboard. You should now see the Redis connection status change to “Connected”—which means you’re good to go!