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:
- How to create a Server/Droplet in DigitalOcean and connect with ZoomAdmin
- How to quickly install MySQL Server using ZoomAdmin Server Control Panel
- How to Install phpMyAdmin, Login to MySQL Server and create Databases/Users
- How to Deploy and Host Multiple WordPress Websites on One VPS Server
- How to Manage DNS Settings in DigitalOcean and Configure Domain Names for apps
- How to Install Redis Server and Redis Commander
- How to Connect Visual Studio Code with VPS Servers to Run Commands and Modify Files
- How to Load Test Data in WordPress, Load 20,000+ Articles using phpMyAdmin
- How to Backup DigitalOcean Server and Configure Automatic Backups