How to Update Magento Core for Different PHP Versions and Third-Party Modules

magento2magento2.4.5

Our website is on Magento 2.4.2 and it runs on PHP 7.4. We also have different third party modules running with older versions.

Anyone please help how to update to Magento 2.4.5 p1 which supports PHP 8.1 (is this mean which doesn't support PHP 7.4?) but the server is currently on PHP 7.4. If I update to PHP 8.1, the website became unavailable due to Magento 2.4.2 running on PHP 8.1. So on which stage of update progress, we have to upgrade PHP to 8.1?

In short, I like to know following:

  1. In which stage of update progress upgrade PHP to 8.1 as Magento 2.4.2 not working on PHP 8.1 but latest Magento need PHP 8.1?
  2. Do I have to update third party modules first or Magento core first?

Please advice.

Many thanks in advance.

Best Answer

Upgrading to Magento 2.4.5 p1, which supports PHP 8.1, requires a few steps to ensure a smooth transition.

Firstly, it's recommended to upgrade the third-party modules to their latest versions that support Magento 2.4.5 p1. This can help avoid compatibility issues during the upgrade process.

Next, you can upgrade Magento core to 2.4.5 p1 while still running on PHP 7.4. This will ensure that the website remains available during the upgrade process. You can follow the standard Magento upgrade process to upgrade to 2.4.5 p1.

Once Magento core is upgraded to 2.4.5 p1, you can then upgrade your server's PHP version to 8.1. This can be done using a tool like the PHP Version Manager (phpbrew) or through your hosting provider's control panel. You should also ensure that all the required PHP extensions and modules are installed and enabled for PHP 8.1.

It's important to test your website thoroughly after upgrading both Magento and PHP to ensure that everything is functioning as expected.

In summary, the recommended order of steps to upgrade to Magento 2.4.5 p1 with PHP 8.1 support is:

  1. Upgrade third-party modules to their latest versions that support Magento 2.4.5 p1.

  2. Upgrade Magento core to 2.4.5 p1 while still running on PHP 7.4.

  3. Upgrade the server's PHP version to 8.1 and ensure that all the required extensions and modules are installed and enabled.

  4. Test the website thoroughly to ensure that everything is functioning as expected.

Related Topic