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

Proxy Design Pattern and Requisition List in Magento 2

Spread the love Requisition List in Magento 2 Requisition

Google Ads Conversion Tracking Through Magento Platform:

Spread the love Google Ads Conversion Tracking Through

Object Pool Pattern in Magento2

Spread the love What is Object Pool Pattern in Magento 2 An

JENKINS

Spread the love JENKINS Introduction and Installation

Virtual Type and Type

Spread the love Virtual type is one of the most common

Customize the length of Input field

Spread the love Sometimes we need to change the limit the

How to Add Custom Tab on Admin Dashboard and Count Website Total Visitor in Magento 2?

Spread the love In this blog we’ll see How to Add Custom

How to Add Sign Out Tab in Customer Account in Magento 2?

Spread the love In this blog we’ll see How to Add

How to create custom tab in product detail page in magento 2?

Spread the love In this blog we’ll see how to add

Understanding and Implementing CORS & CSRF

Spread the love What is security? The world has become more

bluethinkinc Blogs