Redis on Laragon
Dendi Handian

Dendi Handian @dendihandian

About: Data Engineer - Building Data Lake & Modern Data Architecture

Location:
Jakarta
Joined:
Oct 13, 2019

Redis on Laragon

Publish Date: Dec 9 '21
59 11

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

Comments 11 total

  • Tove Stanley
    Tove StanleyJan 5, 2022

    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.

    • Dendi Handian
      Dendi HandianJan 5, 2022

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

      • Elikem Seake-Kwawu
        Elikem Seake-KwawuMar 22, 2022

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

        • Dendi Handian
          Dendi HandianMar 22, 2022

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

  • Timothy Soladoye
    Timothy SoladoyeOct 24, 2022

    thanks

  • M H Hasib
    M H HasibJan 28, 2024

    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

    • Dendi Handian
      Dendi HandianJan 29, 2024

      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.

      • M H Hasib
        M H HasibJan 29, 2024

        Thanks. BTW I made it happen.

  • Ali Salehi
    Ali SalehiJun 17, 2024

    tnks Dear @dendihandian.🙏❤️

    I would also add that after all the above, you need to enable the Redis port in the Laragon preferences. (I did this and Redis showed up for me)

    Image description

    And now I can work with it in Laragon!
    Image description

Add comment