Magento2 – Upgrade using Composer

This is the preferred, Composer method for upgrading Magento 2.X.X between minor versions. Replace X.X with the minor version numbers of the target version. The last line is optional, use it only if you’re in the middle of a migration and need to continue to be able to sync data with a 1.x site. If composer fails, this usually means you manually installed magento via GitHub or a tarball. You should probably go back and reinstall magento via Composer to avoid a world of hurt down the road.

php bin/magento maintenance:enable
composer require magento/product-community-edition 2.X.X --no-update
composer update
rm -rf var/di var/generation
php bin/magento cache:clean
php bin/magento cache:flush
php bin/magento setup:upgrade
php bin/magento setup:di:compile
php bin/magento indexer:reindex
php bin/magento maintenance:disable
composer require magento/data-migration-tool:2.X.X

2 Responses to Magento2 – Upgrade using Composer

  1. aron says:

    great post I really liked it helped me a lot

  2. Mary Goldwin says:

    Thanks for sharing this to us. I am not really a Magento fan but this looks very useful

Leave a Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>

Anti-Spam Quiz: