DEV Community

Dendi Handian
Dendi Handian

Posted on • Updated on

Redis on Laragon

Redis is no longer supported in Windows, but the version 3.2.1 is still available to use (ref), so that's why laragon contain version 3.* only. If you want to taste the latest redis version, using Docker through Laradock would be an alternative.

Installing PHP Redis Extension

If you right-click on the dashboard & check on PHP > Extensions, you will not find redis extension because it doesn't come up with Laragon by default. So you have to add it manually, but yet it so easy.

Downloading The PHP Redis Extension DLL File

Go to https://pecl.php.net/package/redis and find the right match your current PHP version but also use the latest stable available. In my case, it was version 5.3.4 at the moment and it supports PHP 8.0, 7.4, 7.3.

php redis version list

Click the Windows icon DLL link to get the available distribution for the version. Download the archive that match with your PHP version. You might be confuse which one between Non-Thread-Safe (NTS) and Thread-Safe (TS) should you pick to download. To find out, just check on your Laragon dashboard and see the php version along with NTS or TS indication.

TS or NTS

Adding the DLL File to the PHP Extension Folder

On the downloaded archive, you should find the php_redis.dll file.

phpredis dll

copy or move the file to the C:\laragon\bin\php\php-7.4.19-Win32-vc15-x64\ext (change to your own path), and then add the line extension=php_redis.dll to the C:\laragon\bin\php\php-7.4.19-Win32-vc15-x64\php.ini file.

the php.ini file was generated after a version of php in laragon was run for the first time.

you should see that Redis extension is available now.
php redis menu

Starting The Redis Server

If you installed the full laragon, redis is availabe in this path C:\laragon\bin\redis\redis-x64-3.2.100 (change to your own path). To run the redis server, you can use Command Prompt to execute the redis-server.exe.

Image description

And you can also stop it later using Ctrl + C.

The phpRedisAdmin

The phpRedisAdmin also available in the full laragon installation and can be accessed at http://localhost/redis

Top comments (9)

Collapse
 
taelkir profile image
Tom Stanley

Great guide, works perfectly. Thank you.

Is there a way that you know of to get Redis to run automatically without the CLI through Laragon, like Apache and SQL do? I can just imagine the number of times in the future I'm going to forget to open a terminal to start it running before I start work.

Collapse
 
dendihandian profile image
Dendi Handian

I don't know why Redis is not in dashboard menu, maybe still in the work by the creator

Collapse
 
eskayamadeus profile image
Elikem Seake-Kwawu

You can find it in "Preferences>Services and ports"

Thread Thread
 
dendihandian profile image
Dendi Handian

Thanks for the info, I rarely click that Preferences menu 😄 and now it open the possibility to explore laragon more and create more posts

Thread Thread
 
taelkir profile image
Tom Stanley

Fantastic, thank you

Collapse
 
timoye profile image
Timothy Soladoye

thanks

Collapse
 
mahmudulhsn profile image
M H Hasib

How can I add the 6.0.2 version to Laragon version 6? I am not finding the DLL file only here. What would be the procedure? pecl.php.net/package/redis

Collapse
 
dendihandian profile image
Dendi Handian

I encourage you to use docker-based solution to install latest redis version in Windows machine (using Docker Desktop/WSL) or eventually in production. Maybe it was stopped to support in Windows.

Collapse
 
mahmudulhsn profile image
M H Hasib

Thanks. BTW I made it happen.