Redis on Laragon

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.

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.

Adding the DLL File to the PHP Extension Folder

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

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.

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

268