Krayin CRM
Read Story

How to use Redis as session management in bagisto

In this blog we will see how to use redis as session management for bagisto. We recommend you to check out our last blog, in which we implement Redis for cache management for bagisto.



Step1. Install Redis:-


Step2. Install the predis/predis package via composer:-


Step3. The redis configuation for bagisto is present inside config/database.php. Open the file and browse to redis array at the end and make the following changes:-


Step4. The session configuration file for bagisto is located inside config/session.php  Now open this file and make the following changes:


Step5. Now the final step, go to bagisto root,  edit the .env  file and make the following changes:-


and we are done here, Now it’s time to test whether redis is working as session management for our bagisto or not.

The best and most simplest way to check is by running;-

You will see the output similar to following:-


And to check the session stored in our redis database:-

                                                Selecting database 2 as defined in config/database.php

We have successfully integrated Redis for session management in bagisto.

Also, for any suggestions or query contact us at

Thanks for reading the article

Stay Connected !!

. . .


Add Your Comment

Be the first to comment.