WordPress.org

Plugin Directory

Test out the new Plugin Directory and let us know what you think.

WP Redis

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).

  1. Install object-cache.php to wp-content/object-cache.php with a symlink or by copying the file.
  2. 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.
    );
    
  3. Engage thrusters: you are now backing WP's Object Cache with Redis.

  4. (Optional) To use the wp redis WP-CLI commands, activate the WP Redis plugin. No activation is necessary if you're solely using the object cache drop-in.
  5. (Optional) To use the same Redis server with multiple, discreet WordPress installs, you can use the WP_CACHE_KEY_SALT constant to define a unique salt for each install.
  6. (Optional) To use true cache groups, with the ability to delete all keys for a given group, register groups with wp_cache_add_redis_hash_groups(), or define the WP_REDIS_USE_CACHE_GROUPS constant 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.
  7. (Optional) On an existing site previously using WordPress' transient cache, use WP-CLI to delete all (%_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.1
Last Updated: 1 month ago
Active Installs: 2,000+

Ratings

5 out of 5 stars

Support

3 of 3 support threads in the last two months have been marked resolved.

Got something to say? Need help?

Compatibility

+
=
Not enough data

0 people say it works.
0 people say it's broken.

100,1,1
100,1,1