Home Technology The 4 Stages of Magento 2 Migration Explained

The 4 Stages of Magento 2 Migration Explained

June 2020 is fast approaching. This is the deadline after which Magento will stop support for all its M1 versions. Those Magento merchants who fail to migrate to Magento 2 by June 2020 are going to face serious maintenance and security issues. Their stores are also going to miss out on some advanced performance optimization features.

For those who are all set to undergo Magento 2 migration, it is important to know the steps involved in the migration process. With the right steps and a well thought out plan, migrating to Magento 2 can be a time for innovation and positive technical transformation within the online business.

Broadly, the Magento migration process is divided into the following four stages.

  • Theme Migration
  • Extension Migration
  • Customization
  • Data Migration

Theme Migration

You can install the same Magento 1 theme if it is compatible with Magento 2. If it’s not, you can either create or buy a custom theme from Magento marketplace.

Extension Migration

Magento 1 extensions are not compatible with Magento 2 so you have to install new Magento 2 extensions. There is no tool either to migrate extensions from M1 to M2.

Customization using Code Migration tool

With the Code Migration Tool, you can safely migrate the custom code to Magento 2.

Data Migration

The last step is to migrate the data. This is a crucial step as you can’t afford to lose the customers, orders, products, or store configuration data while migrating to Magento 2. The Data Migration tool will help you safely migrate the Magento 1 database and make it compatible with Magento 2.

The data migration tool is the most important in this whole process. Configure it incorrectly and you will end up losing lots of useful data. Let’s see how to install and configure it the right way.

How to Install Magento 2 Data Migration Tool

For the tool to work, its version should be the same as the Magento 2 store. For example, if your Magento versions is 2.1.1, you must install the Data Migration Tool v2.1.1. If you are not sure about your Magento 2 version, go to your Magento 2 root directory via SSH and enter the command below.

php bin/magento –version

Now, run the following two commands to update the location of the Data Migration Tool package in the composer.json file.

composerconfigrepositories.magento composer https://repo.magento.com

Composer require magento/data-migration-tool:<version>

Where <version> is the data migration tool version which is the same as that of your Magento 2 store. For example, if the version is 2.1.1, the above command will be replaced with:

Composer require magento/data-migration-tool:2.1.1

Here, you will need to enter your developer authentication keys. The way to find the authentication keys is to go to Magento marketplace, login and click on My Access Keys under My Products tab.

Remember, public key is the username and private key is the password.

How to Configure Data Migration Tool?

Once you are done with the installation of the tool, you will deal with the following directories which contain mapping and configuration files for the tool.

<Magento 2 root dir>/vendor/magento/data-migration-tool/etc/ opensource-to-opensource

This directory contains configuration and scripts for migrating from Magento 1 Open Source platform to Magento 2 Open Source platform.

For Magento 1 open source to Magento 2 commerce, use this command.

<Magento 2 root dir>/vendor/magento/data-migration-tool/etc/opensource-to-commerce

You must create a config.xml file in the relevant directory before migrating any settings and data. For example, go to the <Magento 2 root dir>/vendor/magento/data-migration-tool/etc/opensource-to-commerce/<Magento 1.x version> directory, if you are migrating data from Magento 1 Open Source platform to Magento 2 commerce. Also, rename config.xml.dist to config.xml.

Now, open config.xml in an editor and specify the following.

<source>

<database host=“localhost” name=“Magento1-DB-name” user=“DB-username” password=“DB-password” />

</source>

<destination>

<database host=“localhost” name=”Magento2-DB-name” user=“DB-username” password=“DB-password” />

</destination>

<crypt_key>Magento1-Encrypted-Key</crypt_key>

</options>

Where

<source> : has Magento 1’s database information

<destination> : has relevant information of Magento 2

<crypt_key> : the encryption key of Magento 1 which can be found in in <key> tag for <Magento 1 rootdir>/app/etc/local.xml file.

Finally, save the config.xml.

How to Migrate Settings?

Settings include stores, system configurations such as tax settings, shipping, payment etc. To migrate settings, Navigate to your Magento 2 root directory via SSH and run the following command:

php bin/magentomigrate:settings –reset <path to your config.xml>

where<path to your config.xml> would be vendor/magento/data-migration-tool/etc/opensource-to-opensource/<Magento 1.x version>/config.xml. The –reset argument forces the data migration to start from the beginning.

You will get a success message upon successful migration.

How to Migrate Data?

Data includes products, customers, orders, categories, etc. To migrate data, run the following command.

php bin/magentomigration:data –reset <path to your config.xml>

If everything goes smooth, a success message will be displayed.

After you are done, run a test to see if everything is working well.

Conclusion:

Migrating to Magento 2 is the need of the day and the first thing you should do to take advantage of all the great features Magento 2 has to offer. The process is not that easy and should be undertaken by certified professional Magento developers. Any mistake in the migration process will lead to loss of valuable data and/or poor store performance.

Imran Zahidhttp://digitaldailys.com
Hi I'm Imran Zahid a professional blogger having experience in blogging as well as freelancing. My basic researched on tech, health, entertainment, Digital Marketing and home improvement. I'd like to share my experience with all of you be connect to explore the knowledge. Thank you

LEAVE A REPLY

Please enter your comment!
Please enter your name here

Most Popular

Best 2 Student Pg in Dehradun

Located within the Doon Valley which isn't very far away from Himalayan foothills, Dehradun is nestled between two rivers the Ganges and therefore the...

Top 15 Best Gaming Apps to Earn Money Online

The world is brining & adopting new technology almost every day. Android phone is the most common example of technology that changed our life...

Choose Vertical Canvas Art for Home Office Décor

You love your job, but do you love your workplace? Well, work-from-home life can be lousy if you don’t take proper care of your...

A Basic Introduction to Filters used in Powered Air purifying respirators

When you are shopping for powered air purifying respirators, the very first thing you are advised to check is the type of filter used...

Recent Comments

you're currently offline

We use cookies in order to give you the best possible experience on our website. By continuing to use this site, you agree to our use of cookies.
Accept
Privacy Policy