Update the Commerce application
This topic discusses how a contributing developer can update Magento without reinstalling it. To perform an upgrade if you’re not a contributing developer, see Updating the Magento application and components.
To update the Magento software if you are a contributing developer:
- Log in to your Magento server as, or switch to, the file system owner.
-
Save any changes you made to
composer.json
because the following steps will overwrite it:1
cd <magento_root>
1
cp composer.json composer.json.old
-
Update your local repository to get the latest code:
1
git pull origin develop
If
git pull origin develop
fails, see troubleshooting. - Diff and merge your
composer.json.old
withcomposer.json
installed with the Magento software. -
Enter the following command:
1
composer update
-
Update the Magento database:
1
<magento_root>/bin/magento setup:upgrade
-
Clean the cache:
1
bin/magento cache:clean