5 (100%) 1 vote

Here are the steps that you will follow in this Magento 2 Upgrade: How To & Two Ways to Upgrade Magento 2.0.0 to 2.0.2?:

Magento 2.0.2 Upgrade (via Composer ) Upgrade Magento 2.0.0 to 2.0.2 (via Magento admin )

Hi friends,

Let ‘s not talk about how powerful, and overwhelming new features Magento 2 has. How about: As Magento 2 releases and updates regularly, the task updating/upgrading system is essential to get all the benefits for your Magento sites?

In this tutorial, we would love to guide you the ways which can work best to upgrade Magento 2.0, (recently from ver. 2.0.0 to 2.0.2) by composer update & via Magento Admin.



1- Magento 2.0.2 Upgrade (via Composer )

Please note that Changing v ersion and running composer update is only for those who have access to command line, and, of course, have experience in using it (developers and SIs).

After run composer update it is required to fill in the Username and Password:



*This Access is the same Authentication Key you used to install Magento software.

In composer.json change this line:

<span style="color: #339966;"><em><span style="font-weight: 400;">"magento/product-community-edition": "2.0.2",</span></em></span> 1 < span style = "color: #339966;" > < em > < span style = "font-weight: 400;" > "magento/product-community-edition" : "2.0.2" , < / span > < / em > < / span >

You need also change the line 5 “version”: “2.0.2”, to keep it in sync to which version you want, and then run:

<span style="color: #339966;"><em><span style="font-weight: 400;">composer update </span></em></span> 1 2 < span style = "color: #339966;" > < em > < span style = "font-weight: 400;" > composer update < / span > < / em > < / span >

<span style="color: #339966;"><em><span style="font-weight: 400;">php bin/magento setup:upgrade </span></em></span> 1 < span style = "color: #339966;" > < em > < span style = "font-weight: 400;" > php bin / magento setup : upgrade < / span > < / em > < / span >

<span style="color: #339966;"><em><span style="font-weight: 400;">php bin/magento setup:static-content:deploy </span></em></span> 1 2 < span style = "color: #339966;" > < em > < span style = "font-weight: 400;" > php bin / magento setup : static - content : deploy < / span > < / em > < / span >

Result as below:

<span style="color: #339966;"><em><span style="font-weight: 400;">composer require magento/product-community-edition 2.0.2 --no-update </span></em></span> 1 2 < span style = "color: #339966;" > < em > < span style = "font-weight: 400;" > composer require magento / product - community - edition 2.0.2 -- no - update < / span > < / em > < / span >

<span style="color: #339966;"><em><span style="font-weight: 400;">composer update </span></em></span> 1 < span style = "color: #339966;" > < em > < span style = "font-weight: 400;" > composer update < / span > < / em > < / span >

<span style="color: #339966;"><em><span style="font-weight: 400;">rm -rf var/di var/generation </span></em></span> 1 < span style = "color: #339966;" > < em > < span style = "font-weight: 400;" > rm - rf var / di var / generation < / span > < / em > < / span >

<span style="color: #339966;"><em><span style="font-weight: 400;">php bin/magento cache:clean </span></em></span> 1 < span style = "color: #339966;" > < em > < span style = "font-weight: 400;" > php bin / magento cache : clean < / span > < / em > < / span >

<span style="color: #339966;"><em><span style="font-weight: 400;">php bin/magento cache:flush </span></em></span> 1 < span style = "color: #339966;" > < em > < span style = "font-weight: 400;" > php bin / magento cache : flush < / span > < / em > < / span >

<span style="color: #339966;"><em><span style="font-weight: 400;">php bin/magento setup:upgrade </span></em></span> 1 < span style = "color: #339966;" > < em > < span style = "font-weight: 400;" > php bin / magento setup : upgrade < / span > < / em > < / span >

<span style="color: #339966;"><em><span style="font-weight: 400;">php bin/magento setup:di:compile </span></em></span> 1 < span style = "color: #339966;" > < em > < span style = "font-weight: 400;" > php bin / magento setup : di : compile < / span > < / em > < / span >

<span style="color: #339966;"><em><span style="font-weight: 400;">php bin/magento indexer:reindex</span></em></span> 1 < span style = "color: #339966;" > < em > < span style = "font-weight: 400;" > php bin / magento indexer : reindex < / span > < / em > < / span >

2- Upgrade Magento 2.0.0 to 2.0.2 (via Magento admin )

1 Log-in the Magento Admin as Administrator 2 Follow System > Tools > Web Setup Wizard 3 Enter System Configuration . 4 Enter your authentication keys 4 Click Save Config 5 Then System Upgrade 6 Continue with the 1st Step – Select versions to upgrade

The recommended and more easy way is to upgrade Magento 2 via System Upgrade. It is mainly for those who have limited technical abilities or no access to command line via their hosting provider.

1- Log-in the Magento Admin as Administrator.

2- Follow System > Tools > Web Setup Wizard

3- Enter System Configuration.

4- Enter your authentication keys in the provided fields if you haven’t done yet. The following figure shows an example if you have already entered your keys.

*Whenever before Upgrade or Update, you must access with the Authentication keys which used to install the Magento software.

* Please note that you can’t use the key of Magento CE to upgrade or update Magento EE or vice versa. Also, you can use neither of: another user’s authentication key, or shared account authentication keys

5- Click Save Config.

6- Then System Upgrade.

Magento immediately begins searching for core module updates. If you also want to search for component updates, click Yes. Sample displayed as follow:

The page displays similar to the following when we find components to upgrade.

7- Continue with the 1st Step – Select versions to upgrade.

Error you may encounter:

The following error can indicate one of several problems, including authentication keys issue if you have not entered in the Magento Admin:

Sample data

The System Upgrade utility also installs sample data for you but doesn’t display it, if you did these: