Magento 2’s latest release always focuses on enhancing security, improving performance, and fixing bugs. This blog can help you with Magento 2 Upgrade services.
Please check the system requirements for the Magento 2 version
Note: It is recommended to take the code and database backup if you plan to upgrade your live site.
We will upgrade to the latest Magento in the following steps.
Step 1: Change your composer version to the compatible version of the latest Magento 2 version.
composer -vvv about
Step 2: Take a backup of the composer.json
cp composer.json composer.json.bak
Step 3: Put your site into maintenance mode.
php bin/magento maintenance:enable
Step 4: Install the Composer update plugin
composer require magento/composer-root-update-plugin=~2.0 --no-update
Step 5: Update Magento version in the composer.json file using the below command. You can type any required Magento version.
composer require magento/product-community-edition=2.4.8 --no-update
Step 6: This step keeps you safe from dependency version issues. You have to update the “require-dev” key in root composer.json. You can see this in the Magento composer.json file on GitHub.
Check the Magento 2.4.8 required compatible dependencies.
Here we are using the require-dev of Magento 2.4.8.
"require-dev": {
"magento/magento-allure-phpunit": "^3.0",
"dealerdirect/phpcodesniffer-composer-installer": "^0.7 || ^1.0",
"dg/bypass-finals": "^1.4",
"friendsofphp/php-cs-fixer": "^3.22",
"carlos-mg89/oauth": "^0.8.17",
"magento/magento-coding-standard": "*",
"magento/magento2-functional-testing-framework": "^5.0",
"pdepend/pdepend": "3.x-dev",
"phpmd/phpmd": "3.x-dev",
"phpstan/phpstan": "^1.9",
"phpunit/phpunit": "^10.5",
"symfony/finder": "^6.4"
}
Step 7: Now, change the PHP version to the compatible version with Magento 2.4.8.
sudo a2dismod php7.3 sudo a2enmod php8.3 sudo update-alternatives --set php /usr/bin/php8.3 sudo /etc/init.d/apache2 restart php --version
Step 8: Update dependencies using the following command.
composer update
Step 9: Execute the following commands.
rm -rf var/cache/* rm -rf var/page_cache/* rm -rf generated/code/* bin/magento setup:upgrade php bin/magento setup:di:compile php bin/magento setup:static-content:deploy -f php bin/magento c:f
Step 10: Check the base URL in core_config_data and update it by adding pub/ after the base URL.
php bin/magento c:f
Step 11: Disable the maintenance mode
php bin/magento maintenance:disable
Hope this helps, Thanks 🙂
If you require technical support, feel free to email us at [email protected].
Additionally, explore a wide array of solutions to boost your store’s capabilities by visiting the Adobe Commerce modules section.
For expert advice or to create tailored features, hire Adobe Commerce Developers for your project.
Be the first to comment.