How to install and configure data migration tool in Magento 2?

Let’s lookout how to install and configure the data migration tool in Magento 2 platform.

Data Migration Tool is a great product by the Magento team. It is a tool that eases the data migration process form Magento 1 to Magento 2. The Data migration tool is a Command Line Interface(CLI) based tool with some useful features.

It helps in progress tracking, verification, logging, and test functions in the migration process. Before installing, ensure that both the Data Migration Tool and Magento 2 match.

Let’s go deep on how to install and configure the data migration tool in Magento 2 in this article.

Install Data Migration Tool for Magento 2

INSTALL DATA MIGRATION TOOL FOR MAGENTO 2

You have two methods to install the data migration tool in Magento 2. You can follow either one of the methods to install that we mentioned below,

Method 1

First, Install Data Migration Tool from repo.magento.com

  • Then, log in to your Magento server.
  • Now change to Magento root directory, it requires.

Step 1: Open the command line in the root folder of Magento 2

Step 2: Download the data migration tool in Magento 2, then follow the below command:

composer config repositories.magento composer https://repo.magento.com

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

Note: The <version> from the above command should match the Magento codebase’ version.

For example, if you’re using the Magento 2.3.0, then enter:

composer config repositories.magento composer https://repo.magento.com

composer require magento/data-migration-tool:2.3.0

After the command runs, when prompted, enter your authentication keys

Note: Your public keys and private keys are your username and password.

Also read: Data migration from Magento 1 to Magento 2

Method 2

In this method you can install Data Migration Tool from GitHub using the following steps:

Step 1:

  • Log in to your Magento server as before or switch to the Magento file system owner.
  • Change to Magento root directory, it requires.

Using the following commands, you can install the Data migration tool from GitHub,

composer config repositories.data-migration-tool git https://github.com/magento/data-migration-tool
composer require magento/data-migration-tool:<version>

Note: The <version> from the above command should match the Magento codebase” version.

For example, if you’re using the Magento 2.3.0, then enter:

composer config repositories.data-migration-tool git https://github.com/magento/data-migration-tool
composer require magento/data-migration-tool:2.3.0

You can check the version of your Data Migration Tool with the below guide:

Step 1:

Change your Data Migration Tool directory to the following path,

 <vendor>/magento/data-migration-tool

Step 2:

Open JSON in a text editor, there you find the version of your tool.

Read: Types of data that can be migrated during Magento migration

Configure Data Migration Tool

Configuring the Data Migration Tool is important to reduce the downtime. So the system will match the tool with the current Magento version.

CONFIGURE DATA MIGRATION TOOL

  • Log in to your Magento server
  • Change the directory by following below command
<your Magento 2 install dir>/vendor/magento/data-migration-tool/etc/<migration edition>/<ce or version>
  • Use the command below to create XML:
cp config.xml.dist config.xml
  •  Open XML in a text editor
  •  Change the lines below at minimum:
<source> <database host="127.0.0.1" name="magento1" user="root"/></source><destination> <database host="127.0.0.1" name="magento2" user="root"/></destination><options> <crypt_key /></options>
  • You must fill in <crypt_key> which is in file XML located in the directory of Magento 1.
The parameters database user password=<password> and table prefix <source_prefix>, <dest_prefix> are optional.
  • Then save the changes in XML then close the text editor.

Read: Checklist of Magento 2 Migration: The Actionable Plan

Configure mapping files

The mapping files supporting the Magento version are located in subdirectories:

<your Magento 2 install dir>/vendor/magento/data-migration-tool/etc

Do as follows to configure the mapping files:

  1. Rename the mapping files or copy them to remove the .dist extension.
  2. Edit the mapping files by using schema:
<your Magento 2 install dir>/vendor/magento/data-migration-tool/etc
Rename the XML in <options> node.

These are the ways to install and configure the data migration tool in Magento 2 platform.

If have any question regarding the installation and configuration of Magento migration tool. Contact our Magento expert for a free consultation.

Thanks for reading!

Related Content :
 1. How long does it take to migrate Magento 1 to 2?
 2. What are the steps involved in Magento migration plan?
 3. Magento 1 vs Magento 2: A worthful comparison
 4. Is there any successful Magento 2 migration projects?
 5. What are the pros and cons of Magento Migration?

Last Update: June 30, 2020  

February 25, 2020   311   Haribabu    Magento 2 Tutorial, Magento Migration    
Total 0 Votes:
0

Tell us how can we improve this post?

+ = Verify Human or Spambot ?

Leave a Reply

Your email address will not be published. Required fields are marked *

Facebook
Twitter
INSTAGRAM
LinkedIn