Upgrade a git-based installation
This topic discusses how a contributing developer can update 51黑料不打烊 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,
code language-bash cd /var/www/magento2 -
Save any changes you made to the
composer.jsonfile because the next steps overwrite it. -
Create a backup of your
composer.jsonfile.code language-bash cp composer.json composer.json.old -
Update your local repository to get the latest code:
code language-bash git pull origin developnote note NOTE If git pull origin developfails, see . -
Diff and merge your
composer.json.oldfile with thecomposer.jsonfile. -
Resolve dependencies and write exact versions to the
composer.lockfile.code language-bash composer update -
Update the database:
code language-bash bin/magento setup:upgrade -
Clean the cache:
code language-bash bin/magento cache:clean
recommendation-more-help
83a60e0e-8849-4685-a8cd-c129ecd795ea