PHPackages                             devgeniem/wp-redis-object-cache-dropin - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Caching](/categories/caching)
4. /
5. devgeniem/wp-redis-object-cache-dropin

ActiveWordpress-dropin[Caching](/categories/caching)

devgeniem/wp-redis-object-cache-dropin
======================================

A persistent object cache backend for WordPress powered by Redis. Supports Predis, PhpRedis, HHVM, replication and clustering.

1.6.1(3y ago)832.4k↓93.1%7[3 issues](https://github.com/devgeniem/wp-redis-object-cache-dropin/issues)[1 PRs](https://github.com/devgeniem/wp-redis-object-cache-dropin/pulls)GPL-3.0+PHP

Since Sep 15Pushed 3y ago4 watchersCompare

[ Source](https://github.com/devgeniem/wp-redis-object-cache-dropin)[ Packagist](https://packagist.org/packages/devgeniem/wp-redis-object-cache-dropin)[ Docs](https://github.com/devgeniem/wp-redis-object-cache-dropin)[ RSS](/packages/devgeniem-wp-redis-object-cache-dropin/feed)WikiDiscussions master Synced today

READMEChangelog (1)Dependencies (2)Versions (19)Used By (0)

Redis Object Cache for WordPress
================================

[](#redis-object-cache-for-wordpress)

A persistent object cache backend powered by Redis. Supports [Predis](https://github.com/nrk/predis/), [PhpRedis (PECL)](https://github.com/phpredis/phpredis), [HHVM](https://github.com/facebook/hhvm/tree/master/hphp/system/php/redis), replication, clustering and [WP-CLI](http://wp-cli.org/).

Forked from Eric Mann's and Erick Hitter's [Redis Object Cache](https://github.com/ericmann/Redis-Object-Cache).

And forked again from Till Krüss's [Redis Cache](https://github.com/tillkruss/redis-cache).

We wanted to have only the `object-cache.php` dropin file and nothing else.

Installation
------------

[](#installation)

```
$ composer require devgeniem/wp-redis-object-cache-dropin

```

Connection Parameters
---------------------

[](#connection-parameters)

By default the object cache drop-in will connect to Redis over TCP at `127.0.0.1:6379` and select database `0`.

To adjust the connection parameters, define any of the following constants in your `wp-config.php` file.

- `WP_REDIS_CLIENT` (default: *not set*)

    Specifies the client used to communicate with Redis. Supports `hhvm`, `pecl` and `predis`.
- `WP_REDIS_SCHEME` (default: `tcp`)

    Specifies the protocol used to communicate with an instance of Redis. Internally the client uses the connection class associated to the specified connection scheme. Supports `tcp` (TCP/IP), `unix` (UNIX domain sockets), `tls` (transport layer security) or `http` (HTTP protocol through Webdis).
- `WP_REDIS_HOST` (default: `127.0.0.1`)

    IP or hostname of the target server. This is ignored when connecting to Redis using UNIX domain sockets.
- `WP_REDIS_PORT` (default: `6379`)

    TCP/IP port of the target server. This is ignored when connecting to Redis using UNIX domain sockets.
- `WP_REDIS_PATH` (default: *not set*)

    Path of the UNIX domain socket file used when connecting to Redis using UNIX domain sockets.
- `WP_REDIS_DATABASE` (default: `0`)

    Accepts a numeric value that is used to automatically select a logical database with the `SELECT` command.
- `WP_REDIS_PASSWORD` (default: *not set*)

    Accepts a value used to authenticate with a Redis server protected by password with the `AUTH` command.

Configuration Parameters
------------------------

[](#configuration-parameters)

To adjust the configuration, define any of the following constants in your `wp-config.php` file.

- `WP_CACHE_KEY_SALT` (default: not set)

    Set the prefix for all cache keys. Useful in setups where multiple installs share a common `wp-config.php` or `$table_prefix`, to guarantee uniqueness of cache keys.
- `WP_REDIS_MAXTTL` (default: *not set*)

    Set maximum time-to-live (in seconds) for cache keys with an expiration time of `0`.
- `WP_REDIS_GLOBAL_GROUPS` (default: `['blog-details', 'blog-id-cache', 'blog-lookup', 'global-posts', 'networks', 'rss', 'sites', 'site-details', 'site-lookup', 'site-options', 'site-transient', 'users', 'useremail', 'userlogins', 'usermeta', 'user_meta', 'userslugs']`)

    Set the list of network-wide cache groups that should not be prefixed with the blog-id *(Multisite only)*.
- `WP_REDIS_IGNORED_GROUPS` (default: `['counts', 'plugins']`)

    Set the cache groups that should not be cached in Redis.

Replication &amp; Clustering
----------------------------

[](#replication--clustering)

To use Replication and Clustering, make sure your server is running PHP7, your setup is using Predis to connect to Redis and you consulted the [Predis documentation](https://github.com/nrk/predis).

For replication use the `WP_REDIS_SERVERS` constant and for clustering the `WP_REDIS_CLUSTER` constant. You can use a named array or an URI string to specify the parameters.

For authentication use the `WP_REDIS_PASSWORD` constant.

### Master-Slave Replication

[](#master-slave-replication)

```
define( 'WP_REDIS_SERVERS', [
    'tcp://127.0.0.1:6379?database=15&alias=master',
    'tcp://127.0.0.2:6379?database=15&alias=slave-01',
] );
```

### Clustering via Client-side Sharding

[](#clustering-via-client-side-sharding)

```
define( 'WP_REDIS_CLUSTER', [
    'tcp://127.0.0.1:6379?database=15&alias=node-01',
    'tcp://127.0.0.2:6379?database=15&alias=node-02',
] );
```

Maintainers
-----------

[](#maintainers)

[@onnimonni](https://github.com/onnimonni)

[@villepietarinen](https://github.com/villepietarinen)

###  Health Score

38

—

LowBetter than 83% of packages

Maintenance13

Infrequent updates — may be unmaintained

Popularity32

Limited adoption so far

Community23

Small or concentrated contributor base

Maturity72

Established project with proven stability

 Bus Factor1

Top contributor holds 82.8% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~226 days

Recently: every ~577 days

Total

13

Last Release

1226d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/5691777?v=4)[Onni Hakala](/maintainers/onnimonni)[@onnimonni](https://github.com/onnimonni)

![](https://avatars.githubusercontent.com/u/11960000?v=4)[Hion Digital Oy](/maintainers/devgeniem)[@devgeniem](https://github.com/devgeniem)

---

Top Contributors

[![tillkruss](https://avatars.githubusercontent.com/u/665029?v=4)](https://github.com/tillkruss "tillkruss (72 commits)")[![onnimonni](https://avatars.githubusercontent.com/u/5691777?v=4)](https://github.com/onnimonni "onnimonni (2 commits)")[![ethitter](https://avatars.githubusercontent.com/u/321503?v=4)](https://github.com/ethitter "ethitter (2 commits)")[![lkraav](https://avatars.githubusercontent.com/u/147228?v=4)](https://github.com/lkraav "lkraav (1 commits)")[![neutric](https://avatars.githubusercontent.com/u/5984479?v=4)](https://github.com/neutric "neutric (1 commits)")[![Nomafin](https://avatars.githubusercontent.com/u/3604893?v=4)](https://github.com/Nomafin "Nomafin (1 commits)")[![pnu](https://avatars.githubusercontent.com/u/45619?v=4)](https://github.com/pnu "pnu (1 commits)")[![rohmann](https://avatars.githubusercontent.com/u/1506848?v=4)](https://github.com/rohmann "rohmann (1 commits)")[![scott-kennedy](https://avatars.githubusercontent.com/u/917616?v=4)](https://github.com/scott-kennedy "scott-kennedy (1 commits)")[![todiadiyatmo](https://avatars.githubusercontent.com/u/2767210?v=4)](https://github.com/todiadiyatmo "todiadiyatmo (1 commits)")[![aleks-lynx](https://avatars.githubusercontent.com/u/93769324?v=4)](https://github.com/aleks-lynx "aleks-lynx (1 commits)")[![villepietarinen](https://avatars.githubusercontent.com/u/5517842?v=4)](https://github.com/villepietarinen "villepietarinen (1 commits)")[![carlalexander](https://avatars.githubusercontent.com/u/654684?v=4)](https://github.com/carlalexander "carlalexander (1 commits)")[![jerclarke](https://avatars.githubusercontent.com/u/139995?v=4)](https://github.com/jerclarke "jerclarke (1 commits)")

### Embed Badge

![Health badge](/badges/devgeniem-wp-redis-object-cache-dropin/health.svg)

```
[![Health](https://phpackages.com/badges/devgeniem-wp-redis-object-cache-dropin/health.svg)](https://phpackages.com/packages/devgeniem-wp-redis-object-cache-dropin)
```

###  Alternatives

[wp-media/wp-rocket

Performance optimization plugin for WordPress

7531.3M3](/packages/wp-media-wp-rocket)[helsingborg-stad/municipio

A bootstrap theme for creating municipality sites.

4028.5k10](/packages/helsingborg-stad-municipio)[october/rain

October Rain Library

1601.7M83](/packages/october-rain)[rhubarbgroup/redis-cache

A persistent object cache backend for WordPress powered by Redis. Supports Predis, PhpRedis, Relay, replication, sentinels, clustering and WP-CLI.

527101.4k1](/packages/rhubarbgroup-redis-cache)[pressbooks/pressbooks

Pressbooks is an open source book publishing tool built on a WordPress multisite platform. Pressbooks outputs books in multiple formats, including PDF, EPUB, web, and a variety of XML flavours, using a theming/templating system, driven by CSS.

45444.2k1](/packages/pressbooks-pressbooks)[mediawiki/maps

Adds various mapping features to MediaWiki

84152.3k3](/packages/mediawiki-maps)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
