Processing... Please wait...

Product was successfully added to your shopping cart.

Magento 2 upgrade to the latest version - 3 simple ways

In the previous article I described how to migrate to Magento. Today I will describe how to perform Magento 2 upgrade.

When you run eCommerce store it is vital to stay secure and up to date. Always monitor the latest version and update promptly.

Always backup your files and DB before attempting an upgrade. A lot of things might go wrong. You better have a way to go back.



3 ways to upgrade M2 installation


  1. Command line using composer.
  2. Web Setup Wizard at System > Tools.
  3. Manual copy/paste.


1. Magento 2 upgrade with composer


Composer is a dependency manager for PHP. It can help you update your store with minimum hassle.

You will need to use SSH. Ask your hosting company for credentials. Login to your server and go to Magento root folder (usually it is ~/public_html):

cd ~/public_html

Then remove everything in vendor folder:

rm -rf vendor/*

Now you can open composer.json file and replace your current version with the latest version sequence:


Set the latest Magento 2 version in composer.json Set the latest Magento 2 version in composer.json


When that is done go to SSH and update Magento 2 with composer:

composer update

It will ask you for credentials to repo.magento.com. You might obtain those at https://marketplace.magento.com/customer/accessKeys/:

Magento marketplace public/private keys Magento marketplace public/private keys


One thing to remember: username is a public key and password is a private key. That is one of the ways Magento might confuse you:)

Once entered composer will go ahead and install the latest Magento 2:

Magento 2 upgrade with composer Magento 2 upgrade with composer

When it is completed run another SSH command and upgrade magento database:

php5 bin/magento setup:upgrade

After that you might want to recompile (if you are in production mode):

php bin/magento deploy:mode:set production

This is it. You successfully performed Magento 2 upgrade. Now go to frontend and backend and check everything.

NB: Composer might complain about some php extensions not loaded. You might want to install them in order to proceed.


2. Web Setup Wizard in backend menu


There is a menu under System > Tools called Web Setup Wizard. You can use it to install extensions bought via Magento Marketplace. You can also use it to upgrade Magento.

NB: There might not be such a link in your installation. That is a bug which is not fixed as of Magento 2.1.8. The simple workaround is:

  1. Login to Magento backend.
  2. Go to http://shop.com/admin_xxx/admin/backendapp/redirect/app/setup/. http://shop.com/admin_xxx is path your backend.
  3. You will be automatically redirected to http://shop.com/setup/#/home. There select System Upgrade.


Magento 2 Web Setup Wizard Magento 2 Web Setup Wizard


Click on System Upgrade and follow instructions. They are self-explanatory.

If Show All Versions is checked you can upgrade to unstable development releases.

Magento 2 web setup wizard upgrade Magento 2 web setup wizard upgrade


At Step 2. Readiness Check you might need to upgrade your PHP. Or install plugins. Do as suggested:


Step 2. Rediness Check Step 2. Rediness Check


I suggest you backup your files and database manually. Skip Create Backup step. It might hang and you will need to start over.



3. Download the latest version manually copy/paste


Upgrade this way if the previous two failed for whatever reason.

Download the latest Magento 2 off the official website. Unzip it in your magento main folder. That will overwrite the core files with the new ones.

Then run:

php bin/magento setup:upgrade


php bin/magento deploy:mode:set production

That will upgrade database, compile and deploy static content. It might require some time depending on the number of products, orders and customers you have.

Upgrade is done. Head to frontend and backend and see if everything looks normal.



Can I downgrade Magento 2 the same way I upgrade?


Yes you can!

You should follow step 1 and downgrade with composer. Just put the version number you would like to have and repeat everything else.

I have tried this method and successfully downgraded 2.1.8 to 2.1.6.

I don't think you can use Web Setup Wizard. But I am sure you can copy/paste i.e. follow step 3 to downgrade M2.


Do you know Magento 2 can be slow? And slow checkout leads to sloppy conversion rates.

Check these 3 simple steps to improve Magento 2 performance. Or contact speed experts to do it for you.




Like the article? Share:


Other articles you might be interested in:

  1. Get country code from country name in magento
  2. Magento Developers - 3 Questions to Ask When Hiring (VIDEO)
  3. Reduce TTFB down to 1s or less
  4. How to install Magento 2 on MacBook
  5. A Technical Overview of Magento


Our Magento extensions you might be interested in:


If you find this post interesting do not hesitate to sign up for our newsletter and join the 859 people who receive Magento news, tips and tricks regularly.

Thank You!



One thought on “Magento 2 upgrade to the latest version - 3 simple ways”
  • markwarner

    Good tips to upgrade the Magento! Many people want to upgrade their Magento with the higher version. After visiting this article, they can have a rough idea of upgrading their Magento versions! Looking to visit this article more often in the future!