How to Configure Redis Object Cache in WordPress


 
In this tutorial, we will show you how to Configure Redis inside WordPress. Installing Redis is a different challenge, but we have a separate tutorial for that, see below. After you install Redis, follow these steps to configure Redis inside WordPress to speedup wordpress using Redis Object Cache.
 
Steps:

  • Install Redis using ZoomAdmin if not done yet.
  • Login into WordPress Admin
  • Install Redis Object Cache plugin.
  • Connect to your Server Using VSCode Remote (see tutorial link below)
  • Configure Redis Object Cache plugin using VSCode
  • Test and confirm Redis cache is working.

 
CONFIGURATION


//Salt for the cache objects, site-url, replace dot and forward slash with dash

define( ‘WP_CACHE_KEY_SALT’, ‘your-domain-here’ );
//IP or hostname of the target server. Either app/container name, i.e. redis1 or localhost
define( ‘WP_REDIS_HOST’, ‘app-name-or-server-ip’ );
// Either the default 6379 when using appName as host or 30xxx port number found in app quick view
define( ‘WP_REDIS_PORT’, ‘6379’ );
//either not set as there is no password by default for Redis, or if you changed redis password, set it here
define( ‘WP_REDIS_PASSWORD’, ‘redis-pass-or-empty’ );

 
 



Related Tutorials: