Back your WP Object Cache with Redis, a high-performance in-memory storage backend.
This assumes you have a PHP environment with the required PhpRedis extension and a working Redis server (e.g. Pantheon).
wp-content/object-cache.phpwith a symlink or by copying the file.
If you're not running on Pantheon, edit wp-config.php to add your cache credentials, e.g.:
$redis_server = array( 'host' => '127.0.0.1', 'port' => 6379, 'auth' => '12345', 'database' => 0, // Optionally use a specific numeric Redis database. Default is 0. );
Engage thrusters: you are now backing WP's Object Cache with Redis.
wp redisWP-CLI commands, activate the WP Redis plugin. No activation is necessary if you're solely using the object cache drop-in.
WP_CACHE_KEY_SALTconstant to define a unique salt for each install.
wp_cache_add_redis_hash_groups(), or define the
WP_REDIS_USE_CACHE_GROUPSconstant to true to enable with all groups. However, when enabled, the expiration value is not respected because expiration on group keys isn't a feature supported by Redis.
%_transient_%) transients from the options table:
wp transient delete-all. WP Redis assumes responsibility for the transient cache.
Requires: 3.0.1 or higher
Compatible up to: 4.7.3
Last Updated: 1 month ago
Active Installs: 3,000+
6 of 7 support threads in the last two months have been marked resolved.
Got something to say? Need help?