
You can upgrade your Magento application from the command line if you installed the software by:
- Downloading the metapackage using
- Installing the compressed archive.
Do not use this method to upgrade if you cloned the Magento 2 GitHub repository.
The following instructions show you how to upgrade Magento using Composer.
- Magento 2.4.2 introduced support for Composer 2.
- If you are attempting to upgrade from Magento <2.4.1(“below 2.4.1” for example 2.4.0, 2.3.9, …), you must first upgrade to a version of Magento that is compatible with Composer 2 (for example, 2.4.2) using Composer 1 before upgrading to Composer 2 for Magento >2.4.2 (above 2.4.2 version) upgrades.
Prerequisites to prepare environment before starting the upgrade process:
- Check PHP and environment settings—Verify that PHP and other environment settings are compatible with the system requirements.
- Switch to maintenance mode—To prevent access to your store while it’s being upgraded, switch your store to maintenance mode:
- Install the Composer update plugin—The
magento/composer-root-update-plugin
Composer plugin resolves changes that need to be made to the root projectcomposer.json
file before updating to a new Magento product requirement.The plugin partially automates the manual upgrade by identifying and helping you resolve dependency conflicts instead of requiring you to identify and fix them manually.
- Update the dependencies:
Begin Update of Magento 2.
- Backup the
composer.json
file.Copy to Clipboard - Indicate the Magento community edition packages and the version (
2.4.0
) that you want to upgrade to.Magento Open Source:
Copy to Clipboard
To see the full list of available 2.4 versions:
- Magento Open Source:
- Example – Minor release:
- Minor releases contain new features, quality fixes, and security fixes. Use Composer to specify a minor release. For example, to specify the Adobe Commerce 2.3.7 metapackage:
- Example – Security Patch
- Security patches contain security fixes only. They are designed to make the upgrade process faster and easier.
Use Composer to specify a patch.
For example, to download the Magento Open Source 2.3.6-p1 metapackage:
Apply updates.
Clear the var/
and generated/
subdirectories:
Then Update the Database and Schema:
- After, Setup Upgrade do
di:compile
this command is use for compile all necessary files and generate files .
- Then after do content deploy command for deploy contetnt to magento
Disable maintenance mode:
Let’s Make Things Happen
Transforming your ideas into reality is our expertise. Share your vision without hesitation, and let our skilled team bring it to life.
“Akshar Group Technologies did such a great job at resolving the initial problem that the partnership expanded to include further development and is still ongoing. Diligent and committed, the team goes above and beyond to deliver their work promptly. They have an extensive knowledge base.”
Digital Engage, US