Upgrade a git-based installation
April 17, 2024
- Topics:
- Upgrade
CREATED FOR:
- Experienced
- Admin
- Developer
This topic discusses how a contributing developer can update Adobe Commerce without reinstalling it. If you are not a contributing developer, see Perform an upgrade.
To upgrade if you are a contributing developer:
-
Log in to your server.
-
Switch to the file system owner.
-
Change to the directory where you cloned the application. For example,
cd /var/www/magento2
-
Save any changes you made to the
composer.json
file because the next steps overwrite it. -
Create a backup of your
composer.json
file.cp composer.json composer.json.old
-
Update your local repository to get the latest code:
git pull origin develop
NOTE
Ifgit pull origin develop
fails, see troubleshooting. -
Diff and merge your
composer.json.old
file with thecomposer.json
file. -
Resolve dependencies and write exact versions to the
composer.lock
file.composer update
-
Update the database:
bin/magento setup:upgrade
-
Clean the cache:
bin/magento cache:clean
recommendation-more-help
83a60e0e-8849-4685-a8cd-c129ecd795ea