Upgrade Magento2 via CLI

From Brian Nelson Ramblings
Jump to: navigation, search

Upgrade Magento2 via Command line(cli)

As with any CMS there is always going to updates. If you are currently not using the latest version of Magento 2, which is 2.0.5 at this time, you will want to update/upgrade to the latest release.

Input latest version of Magento2 in composer.json

Find open your composer.json file in your html directory and locate your current version.

vim composer.json

Find the following lines and update them to 2.0.5

around line 17

"magento/product-community-edition": "2.0.0",


"magento/product-community-edition": "2.0.5",

around line 5

"version": "2.0.0",


"version": "2.0.5",

Now we can start the upgrade process via composer

composer update

When asked for your repo.magento.com credentials, you will want to use the private/public key from your magento account.


Then finish up the upgrade:

Everywhere says you need at least 2Gb of memory to perform the upgrade, I have been able to get away with 1GB, but lets use 2GB just in case

php -d memory_limit=2048M -f  bin/magento setup:upgrade
php -d memory_limit=2048M -f  bin/magento setup:static-content:deploy