How to Upgrade Magento 2.4.3 to 2.4.5-p1

Blog
Spread the love

The following instructions show you how to upgrade using Composer. If your Adobe commerce current version is <2.4.1, you must first upgrade to a version that is compatible with Composer 2 (for example, 2.4.2) using Composer 1 before upgrading to Composer 2 for >2.4.2 upgrades. In addition, you must be running a supported version of PHP.

Before You Begin

Warning: May be you will not able to run magento command after update system requirements and other stuff, so

Run the following commands.

Step 1: Switch to maintenance mode.

php bin/magento maintenance:enable

Now: You must complete the prerequisites and system requirements to prepare enviroment before start the upgrade process.

Please check prerequisites on:

https://experienceleague.adobe.com/docs/commerce-operations/upgrade-guide/prepare/prerequisites.html?lang=en

Manage packages

Create a backup of the composer.json file.

Run:

cp composer.json composer.json.bak

Create a backup of the composer.lock file.

Run:

cp composer.lock composer.lock.bak

The composer.lock file stores a set of exact version dependencies that satisfy all of the version constraints of every requirement for every package in the dependency tree of the project.

Now delete the composer.lock.

Now we are moving on to upgrade.

Step1: Add or remove specific packages based on your needs.

For example, if you are upgrading from Magento Open Source to Adobe Commerce, remove the Magento Open Source package.

Run:

composer remove magento/product-community-edition –no-update

OR if you are upgrading from Magento Enterprise Edition to Adobe commerce

Run:

composer remove magento/product-enterprise-edition –no-update

Step2: You can also upgrade sample data.

Adobe commerce:

Run:

OR

Magento Open Source:

Run:

Step3: Now check composer.json if you have magento-cloud-metapacka

Run:

composer require “magento/magento-cloud-metapackage”:”2.4.5″ –update-with-dependencies

Step4:

Adobe commerce or Enterprise Edition

Run:

composer require-commerce magento/product-enterprise-edition 2.4.5-p1 –no-update

Magento Open Source:

Run:

composer require-commerce magento/product-community-edition 2.4.5-p1 –no-update

Step5:

Run:

composer update -vvv

and output will be something like below screenshot:

magento upgrade output

Unfortunately if got error:

PHP Fatal error: During inheritance of Countable: Uncaught Exception: Deprecated Functionality: Return type of Composer\Repository\CompositeRepository::count() should either be compatible with Countable::count(): int,

Reference link: https://stackoverflow.com/questions/71998726/when-i-upgrading-magento-2-4-4-i-am-getting-deprecated-functionality-return-typ

just update the composer.json with this packages in require

Run again

Composer update

Step6: Clear cache and regenerate code.

You can get a number of errors due to upgrade process, While you will regenerating code and running below commands. So you have to solve the errors one by one.

Run:

Last but not least, remember to turn off maintenance mode.

Run:

php bin/magento maintenance:disable

bluethinkinc_blog

bluethinkinc_blog

2022-10-27

0

Leave a Reply

Your email address will not be published. Required fields are marked *

Find More Blogs

How to Add a Custom Tab to the Customer Order Detail Page in Magento 2

Spread the love Adding a custom tab to the Order Detail

Exception Handling in Java

Spread the love Introduction – Exception:An unwanted

How to add custom less file in Magento2

Spread the love Source files *.css included into layout

Spring Boot Microservices

Spread the love Microservices architecture has become

Implementation of WireMock for better testing

Spread the love WireMock is a flexible and powerful tool

Magento 2: How to selected default option in configurable options?

Spread the love Configurable products in Magento 2 allow

How To Implement Simple JWT Authentication in Django Rest Framework

Spread the love We’ll learn how to use simple JWT

Optimizing Search: Integrating Elasticsearch in Django Applications

Spread the love What is Elasticsearch? Elasticsearch is a

How to create Customer Segments

Spread the love In Magento 2, “customer

Proxy Design Pattern and Requisition List in Magento 2

Spread the love Requisition List in Magento 2 Requisition

bluethinkinc Blogs