Using Redis for PHP Sessions on Ubuntu Server
5 March, 2021 by
Using Redis for PHP Sessions on Ubuntu Server
| No comments yet

Redis Installation

Add repo which maintains latest redis

add-apt-repository ppa:chris-lea/redis-server

Install redis-server and php-binding

apt-get install redis-server php5-redis

PHP session config

Open file vim /etc/php5/mods-available/redis.ini

Add following lines:

session.save_handler = redis
session.save_path = "tcp://"

Restart PHP5-FPM

service php5-fpm restart

Web Viewer

Paths we are referring are EasyEngine specific:

mkdir /var/www/22222/htdocs/cache/redis && cd /var/www/22222/htdocs/cache/redis



git clone
cd phpRedisAdmin
git clone vendor


git clone

Restart CLI commands

redis-cli gets automatically installed.


redis-cli monitor

List all keys

redis-cli KEYS *

Sign in to leave a comment