Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.

luisrenelopez's avatar

Please make sure the PHP Redis extension is installed and enabled.

Hi,

im just trying to use the redis facade, but i get the error: Please make sure the PHP Redis extension is installed and enabled.

I already run "composer require predis/predis", but it still does not work,

Im using ubuntu 18.04.

any suggestion guys?, thanks in advance

0 likes
7 replies
Ishra's avatar

Have you changed the client in config/database.php?

The default since Laravel 6 is phpredis, so if you are using predis/predis you need to specify that in the config.

You can do that in your .env using

REDIS_CLIENT=predis
8 likes
luisrenelopez's avatar

Thanks for the reply, but it does not work i tried in both .env & config/database.php Something i did not mention is i can't find anything related to redis in my php.ini file. Anyways thank you.

Ishra's avatar

If you are using the predis package you don't need to edit your php.ini, so it's correct that you can't find anything related to redis in your php.ini.

Just to make sure, have you installed the redis binaries in Ubuntu?

sudo apt-get install redis-server

If no, install them.

If yes, what happens if you use the redis cli tool?

write this in your Ubuntu terminal:

redis-cli

You should get a prompt similar to this:

127.0.0.1:6379>
1 like
luisrenelopez's avatar
luisrenelopez
OP
Best Answer
Level 1

I finally fixed it;

I removed predis from composer by running

composer remove vendor/predis

and then ran

php artisan config:clear

(i had previously installed predis by doing "composer require predis/predis, but apparently that was the problem")

I don know what exactly is going on but I will find out later, jajajaja, this may help some body else in the future. never give up !

6 likes
embrace's avatar

Correct solution, also you should restart valet too (valet restart). This will restart nginx as well, which is required.

Please or to participate in this conversation.