How to upgrade Magento 2 from 2.4.5 to 2.4.6 or 2.4.7?
How to upgrade Magento 2 from 2.4.5 to 2.4.6 or 2.4.7?
You can upgrade Magento 2 from 2.4.5 to 2.4.6 or 2.4.7 using command line follow below steps:
First Enable maintenance mode using a command.
php bin/magento maintenance:enable
Take backup of you composer.json file using command.
cp composer.json composer.json.bk
Update composer.json file
Select the Magento 2 version that you want ot upgrade to:
To Upgrade to Magento 2.4.6
composer require-commerce magento/product-community-edition 2.4.6 --no-update
To Upgrade to Magento 2.4.6-p3
composer require-commerce magento/product-community-edition 2.4.6-p3 --no-update
To Upgrade to Magento 2.4.7
composer require-commerce magento/product-community-edition 2.4.7 --no-update
Run Composer update :
composer update
Please run below commands one by one.
php bin/magento cache:clean
rm -rf var/cache/*
rm -rf var/page_cache/*
rm -rf generated/code/*
php bin/magento setup:upgrade
php bin/magento setup:di:compile
php bin/magento setup:static-content:deploy -f
Disable Maintainance Mode.
php bin/magento maintenance:disable
And the upgrade should be done now.