PHPackages                             humanmade/wp-redis-predis-client - 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. humanmade/wp-redis-predis-client

ActiveLibrary[Caching](/categories/caching)

humanmade/wp-redis-predis-client
================================

0.2.0(6mo ago)29223.5k—4.3%4[4 issues](https://github.com/humanmade/wp-redis-predis-client/issues)[1 PRs](https://github.com/humanmade/wp-redis-predis-client/pulls)2PHPPHP ^8.2CI passing

Since Apr 12Pushed 3mo ago22 watchersCompare

[ Source](https://github.com/humanmade/wp-redis-predis-client)[ Packagist](https://packagist.org/packages/humanmade/wp-redis-predis-client)[ RSS](/packages/humanmade-wp-redis-predis-client/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (4)Dependencies (2)Versions (7)Used By (2)

   **WP Redis - Predis Client**
 An alternative Redis client for use with [WP Redis](https://github.com/pantheon-systems/wp-redis). Enables TLS connections.   [ ![Build status](https://github.com/humanmade/wp-redis-predis-client/actions/workflows/tests.yml/badge.svg) ](https://github.com/humanmade/wp-redis-predis-client/actions/workflows/tests.yml)     A **[Human Made](https://hmn.md/)** project. Maintained by @nathanielks.   [![](https://camo.githubusercontent.com/21ddd8db8af0243ccabd437a33ded6e2da1e9777d1b4d75f30ab9ac80803c90a/68747470733a2f2f686d6e2e6d642f636f6e74656e742f7468656d65732f686d6e6d642f6173736574732f696d616765732f686d2d6c6f676f2e737667)](https://camo.githubusercontent.com/21ddd8db8af0243ccabd437a33ded6e2da1e9777d1b4d75f30ab9ac80803c90a/68747470733a2f2f686d6e2e6d642f636f6e74656e742f7468656d65732f686d6e6d642f6173736574732f696d616765732f686d2d6c6f676f2e737667)  WP Redis - Predis Client
========================

[](#wp-redis---predis-client)

This is a package that enables the use of [Predis](https://github.com/nrk/predis/) as a Redis Client as opposed to PHPRedis for [WP Redis](https://github.com/pantheon-systems/wp-redis/). Predis has the distinct advantage of connecting to Redis via TLS, encrypting traffic in-transit. Requires WP Redis &gt;= 0.7.0.

Getting Started
---------------

[](#getting-started)

### Requiring Files

[](#requiring-files)

#### Composer

[](#composer)

When using Composer, `functions.php` file will automatically be loaded whenever you include Composer's autoloader in your project.

#### Manually Requiring

[](#manually-requiring)

The only file needing `require_once`ing for WP Predis to work correctly is `functions.php` (which is automatically included via `vendor/autoload.php`, which is generated by Composer). Download this repo somewhere in your project, run `composer install`, and include `vendor/autoload.php` somewhere early (such as `wp-config.php`):

```
require_once '/path/to/wp-redis-predis-client/vendor/autoload.php';

```

### Object Cache stub

[](#object-cache-stub)

Now that files have been included, it's recommended you use the included [`object-cache.php`](object-cache.php) file instead of the one included with WP Redis. It will add the required filters for WP Predis to work and then include WP Redis' `object-cache.php` file. Once `object-cache.php` is in `wp-content` (or whatever content directory you are using), you're good to go!

### Configuring Predis

[](#configuring-predis)

WP Redis - Predis Client adheres to WP Redis' [configuration details](https://github.com/pantheon-systems/wp-redis#installation). Predis also takes an additional argument, `ssl`, for configuring TLS connections. See PHP's [SSL Context options](http://php.net/manual/en/context.ssl.php) for more details.

```
global $redis_server;
$redis_server = array(
    'host' => '127.0.0.1',
    'port' => 6379,
    'ssl'  => array(
        'local_cert' => '/path/to/certificate_and_key.pem',
        'verify_peer' => true,
    ),
);
```

Requirements
------------

[](#requirements)

- PHP 8.2 or higher
- Predis 3.2.0 or higher
- WordPress (when used in production)

Testing
-------

[](#testing)

This package includes comprehensive tests for both standalone and WordPress integration scenarios.

### Quick Test

[](#quick-test)

Run the test suite locally (requires Redis):

```
# Install dependencies
composer install

# Start Redis
docker run -d --name redis-test -p 6379:6379 redis:latest

# Run tests
vendor/bin/phpunit

# Stop Redis
docker stop redis-test && docker rm redis-test
```

### Docker Testing (Multiple PHP Versions)

[](#docker-testing-multiple-php-versions)

Test across multiple PHP versions using Docker Compose:

```
# Start services
docker compose up -d redis

# Run tests with PHP 8.2
docker compose run --rm test-php82 vendor/bin/phpunit

# Run tests with PHP 8.3
docker compose run --rm test-php83 vendor/bin/phpunit

# Run tests with PHP 8.4
docker compose run --rm test-php84 vendor/bin/phpunit

# Stop services
docker compose down
```

For detailed testing documentation, see [TESTING.md](TESTING.md).

###  Health Score

55

—

FairBetter than 98% of packages

Maintenance71

Regular maintenance activity

Popularity44

Moderate usage in the ecosystem

Community26

Small or concentrated contributor base

Maturity66

Established project with proven stability

 Bus Factor1

Top contributor holds 58.2% 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 ~796 days

Total

4

Last Release

202d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/f1d0ffccdc5d339ff98a91e1b224a0d92f93dc8c2f772124473a76655b83129c?d=identicon)[joehoyle](/maintainers/joehoyle)

---

Top Contributors

[![nathanielks](https://avatars.githubusercontent.com/u/314009?v=4)](https://github.com/nathanielks "nathanielks (46 commits)")[![joehoyle](https://avatars.githubusercontent.com/u/161683?v=4)](https://github.com/joehoyle "joehoyle (9 commits)")[![mikelittle](https://avatars.githubusercontent.com/u/358499?v=4)](https://github.com/mikelittle "mikelittle (8 commits)")[![roborourke](https://avatars.githubusercontent.com/u/23417?v=4)](https://github.com/roborourke "roborourke (7 commits)")[![jazzsequence](https://avatars.githubusercontent.com/u/991511?v=4)](https://github.com/jazzsequence "jazzsequence (4 commits)")[![danielbachhuber](https://avatars.githubusercontent.com/u/36432?v=4)](https://github.com/danielbachhuber "danielbachhuber (2 commits)")[![kovshenin](https://avatars.githubusercontent.com/u/108344?v=4)](https://github.com/kovshenin "kovshenin (2 commits)")[![tangrufus](https://avatars.githubusercontent.com/u/2259834?v=4)](https://github.com/tangrufus "tangrufus (1 commits)")

---

Tags

cachepredisrediswordpresswp-redis

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/humanmade-wp-redis-predis-client/health.svg)

```
[![Health](https://phpackages.com/badges/humanmade-wp-redis-predis-client/health.svg)](https://phpackages.com/packages/humanmade-wp-redis-predis-client)
```

###  Alternatives

[predis/predis-async

Asynchronous version of Predis

366348.4k](/packages/predis-predis-async)[rhubarbgroup/redis-cache

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

51795.3k1](/packages/rhubarbgroup-redis-cache)[monospice/laravel-redis-sentinel-drivers

Redis Sentinel integration for Laravel and Lumen.

103830.5k](/packages/monospice-laravel-redis-sentinel-drivers)[jamescauwelier/psredis

Sentinel client for the popular php redis client

77392.9k5](/packages/jamescauwelier-psredis)[cache/predis-adapter

A PSR-6 cache implementation using Redis (Predis). This implementation supports tags

272.6M13](/packages/cache-predis-adapter)[symfony-bundles/redis-bundle

Symfony Redis Bundle

271.1M5](/packages/symfony-bundles-redis-bundle)

PHPackages © 2026

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