Steps to Upgrade Magento Version from 2.x to 2.4.5:The system requirements for Magento 2.4.5 are similar to Magento 2.4.4, make sure your server is set up to support PHP 8.1 and MYSQL 8.0. Only PHP 8.1 is supported, according to Magento 2.4.5's release notes. To view Magento's system requirements, go here.
Step 1: Backup your siteBacking up the Magento 2 store before performing the upgrade process is important to protect against data loss in case of any adverse events during the upgrade. Make sure you back up the entire code folder and database before performing the upgrade
Step 2: Turn on maintenance modeImplement the below command to convert your site into maintenance mode if you are performing on a live site:
php bin/magento maintenance:enable
Step 3: Create backup of root composer.json file by run below:
cp composer.json composer.json.bak
Step 4: Install the Composer update plugin into current version:
composer require magento/composer-root-update-plugin=~1.0 --no-update
Step 5: Run Magento 2 Upgrade CommandsOnce your store is ready for an upgrade, you can run the Magento upgrade commands. In this tutorial, we will be upgrading the store to the latest Magento version, i.e., Magento 2.4.5. Run the following commands:
composer require magento/product-community-edition=2.4.5 --no-update
Step 6: Fire the following command:
Step 7: Clear cache and regenerate code by run these commands:After upgrading the Magento store to the latest version, it is important to run the following commands to run the upgrade module, clear cache, run compile and reindex for better performance:
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
php bin/magento indexer:reindex
Step 8: At last don’t forget to disable maintenance mode
php bin/magento maintenance:disableYou have now successfully upgraded to Magento version 2.4.5.
Hopefully everyone can successfully install Magento 2.4.5 by using the aforementioned instructions. If you are experiencing any lag or performance issues in your store after upgrading to the latest Magento 2 version or if you require any other unique requirements, such as custom features or extensions Use our Customize service. I wish you business success and a sharp increase in sales!