PHPackages                             gdakuzak/codeigniter-predis - 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. [Database &amp; ORM](/categories/database)
4. /
5. gdakuzak/codeigniter-predis

ActiveLibrary[Database &amp; ORM](/categories/database)

gdakuzak/codeigniter-predis
===========================

The CodeIgniter Redis package

01PHP

Since Jul 28Pushed 1y agoCompare

[ Source](https://github.com/gdakuzak/codeigniter-predis)[ Packagist](https://packagist.org/packages/gdakuzak/codeigniter-predis)[ RSS](/packages/gdakuzak-codeigniter-predis/feed)WikiDiscussions main Synced 1mo ago

READMEChangelogDependenciesVersions (2)Used By (0)

> NOTE: this fork is to POC to understand if possible upgrade to PREDIS 2.3. Use at your own risk.

Redis for CodeIgniter
=====================

[](#redis-for-codeigniter)

- Is possible to configure and use multiple redis servers in a CodeIgniter project
- Multiple servers configurations with one configuration file
- Multiple servers by project environment

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

[](#installation)

If you are using composer, type: `composer require gdakuzak/codeigniter-predis`

If not:

1. Download the code as ZIP in `Clone or download` button
2. Extract the downloaded zip into your `application/libraries/` directory
3. Rename the extracted directory to `application/libraries/codeigniter-predis`
4. In your terminal go to library directory and type: `composer install`
5. The installation will create a `codeigniter-predis.php` file into the `application/config/` folder
6. [**See the example here**](https://github.com/Maykonn/codeigniter-predis/blob/master/example/application/controllers/Welcome.php)

Using
-----

[](#using)

1. [Install the Redis server, read the Redis documentation](https://redis.io/).
2. Import the `src/Redis.php` file:

```
require_once APPPATH . 'libraries/codeigniter-predis/src/Redis.php';

```

3. Load the library to your CodeIgniter instance:

```
$this->redis = new \CI_Predis\Redis(['serverName' => 'default']);

```

4. Test:

```
echo $this->redis->ping();

```

5. [**See the example here**](https://github.com/Maykonn/codeigniter-predis/blob/master/example/application/controllers/Welcome.php)

How to perform redis commands?
------------------------------

[](#how-to-perform-redis-commands)

You can perform redis commands in three different ways:

Will call the command on the current setted server, to change server use $redis-&gt;connect() method:

```
$redis->some_redis_command();

```

Alias to the code above:

```
$redis->getServerConnected()->some_redis_command();

```

Call the command in a specific server that isn't the current connect server (but instantiated before using connect method)

```
$redis->getServersCollection()->getServer('some_server')->some_redis_command();

```

###  Health Score

22

—

LowBetter than 22% of packages

Maintenance32

Infrequent updates — may be unmaintained

Popularity1

Limited adoption so far

Community6

Small or concentrated contributor base

Maturity43

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 100% 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.

### Community

Maintainers

![](https://www.gravatar.com/avatar/9d82d0673c2ef841ae590f5149c8827d50938cfb06ab7cef139cc4c8aec1607b?d=identicon)[gdakuzak](/maintainers/gdakuzak)

---

Top Contributors

[![Maykonn](https://avatars.githubusercontent.com/u/1479805?v=4)](https://github.com/Maykonn "Maykonn (43 commits)")

### Embed Badge

![Health badge](/badges/gdakuzak-codeigniter-predis/health.svg)

```
[![Health](https://phpackages.com/badges/gdakuzak-codeigniter-predis/health.svg)](https://phpackages.com/packages/gdakuzak-codeigniter-predis)
```

###  Alternatives

[doctrine/orm

Object-Relational-Mapper for PHP

10.2k285.3M6.2k](/packages/doctrine-orm)[jdorn/sql-formatter

a PHP SQL highlighting library

3.9k115.1M102](/packages/jdorn-sql-formatter)[illuminate/database

The Illuminate Database package.

2.8k52.4M9.4k](/packages/illuminate-database)[mongodb/mongodb

MongoDB driver library

1.6k64.0M546](/packages/mongodb-mongodb)[ramsey/uuid-doctrine

Use ramsey/uuid as a Doctrine field type.

90340.3M211](/packages/ramsey-uuid-doctrine)[reliese/laravel

Reliese Components for Laravel Framework code generation.

1.7k3.4M16](/packages/reliese-laravel)

PHPackages © 2026

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