Magento 2 Update Guide

Magento 2 Update Guide

To guide Magento developers update Magento 2 to the latest available version without reinstalling, today, we would like to walk you through the steps needed when updating it. Below, you will find all the necessary information related to the procedure, including some vital prerequisites.

How to Update Magento 2

There are multiple ways to install it, there are multiple ways to update it
The first and easiest is to update it from Magento “Web Setup Wizard”.
The second way is to update from command-line or terminal

Web Setup Wizard

Updating Magento 2, without sample data to Magento 2.1.0 requires a patch! Yes, you read this correctly. You need to apply patch MDVA-532 to successfully update Magento.
Downloading patch and installing is easy. So head out to http://www.magento.com/download, download it and apply patch.

Go to:

System > Web Setup Wizard > System upgrade

Magento 2 Update Guide
You will see a few steps that we must go through.

  1. Version select. I will select “Version 2.1.0 CE”, because this is the latest version of Magento, at the time of writing this article.
  2. Readiness check. If everything is green go to next step. If not, make sure you have cron jobs running, or refer to the official Magento documentation
  3. Hit “Upgrade” button!
  4. Wait untill you see this screen

Magento 2 Update Guide

Terminal

This approach also requires patch MDVA-532 so go ahead and apply it.
Then enter these commands in terminal:

composer require magento/product-community-edition 2.1.0 --no-update
composer update

After this is completed run:

php bin/magento setup:upgrade

to update database schema and data.

Visit the homepage to see your updated Magento 2. If you get some errors, reset file permissions and ownership and then clean cache.

With sample data – Terminal

If you have sample data installed, your only option to update to 2.1.0 is through terminal. Only Enterprise edition with sample data can update to 2.1.0 through Web setup wizard.

Please back up your composer.json file before continuing

Enter the following into the terminal:

composer require magento/product-community-edition 2.1.0 --no-update

Now copy and paste this big chunk of command:

composer require magento/module-bundle-sample-data:100.1.0 magento/module-widget-sample-data:100.1.0 magento/module-theme-sample-data:100.1.0 magento/module-catalog-sample-data:100.1.0 magento/module-customer-sample-data:100.1.0 magento/module-cms-sample-data:100.1.0 magento/module-catalog-rule-sample-data:100.1.0 magento/module-sales-rule-sample-data:100.1.0 magento/module-review-sample-data:100.1.0 magento/module-tax-sample-data:100.1.0 magento/module-sales-sample-data:100.1.0 magento/module-grouped-product-sample-data:100.1.0 magento/module-downloadable-sample-data:100.1.0 magento/module-msrp-sample-data:100.1.0 magento/module-configurable-sample-data:100.1.0 magento/module-product-links-sample-data:100.1.0 magento/module-wishlist-sample-data:100.1.0 magento/module-swatches-sample-data:100.1.0 magento/sample-data-media:100.1.0 magento/module-offline-shipping-sample-data:100.1.0 --no-update
composer update

Now you wait, When finished, reset file system permissions.

Then run:

php bin/magento setup:upgrade

Now, you know how to update Magento 2. If you have any questions, ask us in comments – Magesolution is always here to help you!

Related post : How to Manage reports in Magento 2 ?

Source: inchoo, Stack overflow, Magento community forum

1578 Total Views 3 Views Today