How to update php-redis extension (and why you might need to do so during shopware updates)

This post gives you an explanation on why you might need to update the php-redis when upgrading to the latest shopware versions and how you can do so hassle-free

Why you might need to update the php-redis extension during shopware updates?

The latest shopware 6.7.7.0 version included the upgrade to Symfony LTS version 7.4. Because the previously used Symfony 7.3 version stopped being actively supported in Jan 2026, shopwares 6.6 LTS version will receive the Symfony update as well as part of the next release.
The update from Symfony 7.3 to 7.4 is only a minor upgrade, so it should not include any breaking changes. While that is true on the code level of Symfony itself, Symfony did increase the needed minimum version of the php-redis extension to 6.1 as part of the minor update. So if you currently use an older version of the extension, you will need to update the extension in order to successfully update shopware. This might especially be the case if you rely on older versions of Linux distributions; the 24.04 LTS version of Ubuntu, for example, ships php-redis extension in version 5.3, which is not compatible, and you need to take action to update the package accordingly.

How can I figure out which php-redis version I’m currently running?

You can check the installed version of php-redis extension by running the following command:

php --re redis | head -1

When that command indicates that you are running on version 6.1 or newer, you are ready to update to the latest shopware version without further action. If you’re currently running an older version, you need to update it first.

Additionally, Symfony added a composer conflict with older php-redis versions, which means that the shopware upgrade (with the included Symfony upgrade) will throw a composer error if you still use an older version.

Should I update my php-redis extension now?

Generally, you should only look at upgrading php-redis when you plan to upgrade to the latest shopware versions, which include the upgrade to Symfony 7.4. Upgrading the php-redis version in existing, running applications provides no real benefit. And quite to the contrary, older shopware versions (especially when you are still on shopware 6.5) might not work with the latest php-redis version. Therefore, you shouldn’t upgrade just in case, only if you are affected and want to upgrade to the latest shopware versions that require this. This guide shouldn’t be considered a general best practice, but rather a troubleshooting guide for when you’re upgrading and run into the need to update the php-redis extension.

How to update the php-redis extension in Docker

Docker makes it easy to control the full environment; therefore, it is straightforward to update the php-redis extension in your Dockerfile.

First you should download the php extension installer for Docker and make it executable:

ADD https://github.com/mlocati/docker-php-extension-installer/releases/latest/download/install-php-extensions /usr/local/bin/
RUN chmod +x /usr/local/bin/install-php-extensions

That script helps you to manage php extensions.

Next you can install the php-redis extension:

RUN install-php-extensions redis

By default, that will install the latest stable version of the extension. It might be the case that you pinned the installed version, and you need to upgrade that:

-RUN install-php-extensions redis-6.0
+RUN install-php-extensions redis-6.3

When you use the official shopware/docker image, that update is already done automatically, and you just need to make sure that you update to the latest version of the image.

How to update the php-redis extension in Ubuntu

You can install the php-redis extension in Ubuntu through the default package manager:

sudo apt install -y php-redis

However, depending on the Ubuntu version you are using, the extension available in the official package repository might be too old.

In that case, you can install the package from the ondrej/php package repository, which is the trusted source for pre-built php packages:

sudo add-apt-repository ppa:ondrej/php # Press enter when prompted.
sudo apt update

After that when you install the php-redis extension it should pick up the latest version:

sudo apt install -y php-redis

How to install the extension locally (with PIE)

There is a new extension installer in the PHP ecosystem called PIE. PIE makes installing extensions easier and installs the latest versions from Packagist. PIE is intended to replace the old PECL installer and works similarly to Composer.

To install PIE follow the installation instructions from the official repository:

curl -fL --output /tmp/pie.phar https://github.com/php/pie/releases/latest/download/pie.phar 
  && gh attestation verify --owner php /tmp/pie.phar 
  && sudo mv /tmp/pie.phar /usr/local/bin/pie 
  && sudo chmod +x /usr/local/bin/pie

When you have PIE installed, you can install the php-redis extension by running:

pie install phpredis/phpredis

How to install the extension locally (with PECL)

PECL is the old-school extension installer in the PHP ecosystem; setting it up is not as straightforward as PIE, so it is not recommended anymore. However, if you have already set up PECL, you can continue using that.

If you have PECL set up, you can install the latest extension by running:

pecl install redis

Leave a Reply