How To Upgrade Magento 2.0.2 To 2.0.4 Version In Nine Easy Steps

Launched in November 2015, Magento 2 remarks a new era of ecommerce innovation with improved performance and advanced features to boost the conversion rates and grow business sales. The Magento versions have been upgraded in mean time to provide users the best services and new functions to serve customer needs.

On 31st March 2016, Magento released the new 2.0.4 version with additional server security issues and various function and features fixes and enhancement performance in Magento 2.0.2 CE version. Additionally, Magento 2.0.4 version also includes sample data, customer registration and other common storefront data. Hence, in this tutorial, we will introduce 9 easy steps to guide you for magento enterprise version upgrade and help you update the newest features.

Step 1: Installing the Node JS For Server

Node JS is a platform built based on JavaScript V8 engines which allows users to easily develop server side web applications. There are many methods to install node JS for server but the most popular one that lot of people generally are using is Install Node from the EPEL Repository.

node-js-install

To gain access to the EPEL repo, you need to modify the repo-list of your installation. We can reconfigure access to this repository by installing a package available in our current repos called epel-release:

sudo yum install epel-release

Once you have access to the EPEL repository, you can install Node.js by using your regular yum commands:

sudo yum install nodejs

Once again, you can check that the installation was successful by asking Node to return its version number:

node –version

v0.10.30

Many people will also want access to npm to manage their Node packages. You can also get this from EPEL by typing:

sudo yum install npm

Step 2: Installing the Composer

Composer is a PHP dependency manager. To install it globally, follow the steps below:

1.go to the /tmp directory by running: cd /tmp
2.download the composer.phar file:

curl -sS https://getcomposer.org/installer | php

3.move it to /usr/local/bin/
mv composer.phar /usr/local/bin/composer

Finally, you are able to use the command composer

Step 3:

Here, you need to take a back up vendor directory then delete all the files and folders in the folder directory by using the following command:

Rm –rf vendor/*

Step 4:Checking the composer.json file in the root Magento directory

You’ll see

“require”:{

Now, you have to check if these code snippets exist here:

“magento/module-bundle-sample-data”: “100.0.*”,

“magento/module-theme-sample-data”: “100.0.*”,

“magento/module-widget-sample-data”: “100.0.*”,

“magento/module-catalog-sample-data”: “100.0.*”,

“magento/module-customer-sample-data”: “100.0.*”,

“magento/module-cms-sample-data”: “100.0.*”,

“magento/module-catalog-rule-sample-data”: “100.0.*”,

“magento/module-sales-rule-sample-data”: “100.0.*”,

“magento/module-review-sample-data”: “100.0.*”,

“magento/module-tax-sample-data”: “100.0.*”,

…….
These code snippets are used to update the sample data and database. So, we need to remove the code snippets which include the sample-data inside.

If there are no more changes, the code snippet “require”: { takes the following form:

“require”: {

“magento/product-community-edition”: “2.0.2”,

“composer/composer”: “@alpha”,

},

Step 5: Change The Version

Now, at this step, you need to change Magento 2.0.2 version to Magento 2.0.4 version.

Now, change the “version”: “2.0.2” to “version”: “2.0.4”,
So,

+ 2.0.2 is the current version

+ 2.0.4 is the upgraded version

You need to do these changes in “require”:

“magento/product-community-edition”: “2.0.2”,

To:

“magento/product-community-edition”: “2.0.4”,

Step 6: Once You Finish The Above Steps, Begin To Upgrade

You need to type the command: composer update

This command will let you download core from Magento to update for new Magento version through composer.json file.

Remember that when you run this command, you’ll require user and pass and the user and pass are rendered by our account on Magento Connect.

To do it, you need to follow the below instructions:

– Log in Magento

go to https://www.magentocommerce.com/magento-connect/customer/account/

– Click “Connect” tab and then choose “Security keys”

After clicking Security keys, the interface will be shown as below:

If you don’t have username and password yet, you should generate a new key with any names. Then you enter a name into Name box and click “Generate new” to create a new key. Public key is the user name and private key is the password

Step 7:Upgrade the database from new core code

When you run the command “composer” to update code core again, you run the command “upgrade” to upgrade database from new code core:

Php bin/magento setup:upgrade

Step 8:

After running the command “upgrade”, continue to use the following command:

php bin/magento setup:static-content:deploy de_DE en_US

de_DE en_US is the local that we want to deploy. If you do not enter these two values, the above command will deploy all the locals our site owns.

Step 9: Remove var/cache

After finishing all the above nine steps, your Magento 2.0.2 version will be upgraded to Magento 2.0.4 successfully and now you can enjoy your own result with newest additional features of the upgraded version of Magento.

Did you find this tutorial useful? Let’s Like, Share and Subscribe for more new knowledge. For any Comments, feel free to contact us anytime!

Save

Save

Leave a Reply