How to Install Magento 2 Data Migration Tool

2
20242
magento data migration tool and how to use it
Reading Time: 4 minutes

Migration from Magento 1 to Magento 2 is the right move towards a high-performing and profitable eCommerce store. To migrate data smoothly, you need a Magento 2 Data Migration Tool.

In this article, we’ll take you through the step-by-step process of installing this tool in Magento 2.

What to Know Before Migrating to Magento 2

Merchants running the unsupported Magento 1 platform risk facing security and performance issues. Also, they risk their competitive edge since innovative features are no longer added to Magento 1.

In turn, the Magento 2 store owners stay one step ahead of the game. They get new powerful features and performance improvements with each software release.

Migration to Magento 2 is not as easy as it might look at first. Some believe it’s just a transfer of Magento data from the old store to a new one, but the procedure is a lot more complicated. It involves a complete recreation of Magento 1 data, settings, and design on a clean Magento 2 installation. 

How much effort the migration will take depends on the number of customizations on the original Magento 1 store. So does the cost of Magento 1 to Magento 2 migration.

For example, migrating a simple store with a default theme and no extensions will take around a workday and cost $1,500–2,000. The more customizations you have, the more time and money it will need to migrate.

What Magento 2 Data Migration Tool is for

For easy Magento 2 data migration, Adobe developed the official Data Migration Tool. This is a command-line interface tool that has verification, logging, progress tracking, and test functions. It’s free to download and aims to help merchants migrate their stores over to the new and improved Magento 2. 

Note:

Data Migration Tool is designed to migrate data from Magento 1 to Magento 2 only. It’s not suitable for migrating from one platform to another, e.g., from WooCommerce to Magento.

Data Migration Tool automates the transfer of the following data to Magento 2:

  • Customers
  • Catalogs
  • Orders
  • Promotions
  • Core configurations

However, the tool cannot transfer media files, admin rights, and some custom data.

You will require third-party solutions if you need, for example, product options migration or order import and export. Also, the content migration tool doesn’t allow you to migrate extensions and a theme—they should be created for a Magento 2 store afresh.

What are the three data migration tools available?

The Magento 2 Data Migration Tool operates in three modes:

  • Settings. The tool migrates the store and system configuration settings from Magento 1 to Magento 2.
  • Data. The tool migrates data from Magento 1 database to Magento 2 database.
  • Delta. The tool migrates incremental data such as new orders and catalog data that may have changed since the primary data migration.

Adobe recommends following the sequence as above to migrate with no issues. 

Every mode has steps such as the EAV step, the settings step, and the URL rewrite step. 

But how is data migration done?

During every step, the tool verifies consistency between the Magento 1 and Magento 2 databases and after it performs data transfer. In the delta mode, the tool transfers changes in store data made since primary migration. The final step is verification tests to ensure all data were migrated successfully.

data migration magento 2 case study

Requirements for Data Migration Tool Installation

Before the database migration to Magento 2, make sure the versions of Magento and Data Migration Tool match.

If you are using the latest version of Magento 2, you should also use the latest version of the Data Migration Tool.

If you don’t know which version you currently use, follow the steps below.

How to Find Magento 2 Software Version

To find your Magento 2 version, run the following command in the terminal:

php <your Magento 2 install dir>/bin/magento --version

If you have downloaded the Magento 2 software using Composer, you should execute the following command:

cd <your Magento 2 clone directory>
git branch

If you are in the develop branch used by default, you should first change it to the released branch.

How to Find the Data Migration Tool Version

Here’s what you should do to find the version of your Magento 2 migration tool:

  • Navigate to your Data Migration Tool directory: vendor/Magento/data-migration-tool.
  • Open your composer.json file in the text editor and find the value “Version.” You’ll see there is the current version of your tool.

Installing Data Migration Tool in Magento 2

There are two ways to install the Data Migration Tool: 

  1. Using repo.magento.com
  2. Using the GitHub repository

In this guide, we’ll describe both methods. 

Install from repo.magento.com

For the correct Data Migration Tool installation, navigate to the Magento root installation directory and update a composer.json file. This is needed to provide the location for the Data Migration Tool package.

  • Log in to your Magento 2 server as the command-line user.
  • Navigate to the Magento 2 root directory.
  • Execute these commands in the terminal:
composer config repositories.magento composer https://repo.magento.com
composer require magento/data-migration-tool:<version>
  • Replace the <version> tag with the current version of your Data Migration Tool. For example, if you have version 2.0.2, enter the following:
composer config repositories.magento composer https://repo.magento.com
composer require magento/data-migration-tool:2.0.2
  • Next, enter your authentication keys. You might copy them from the account page on Commerce Marketplace, where your public key is the username and the private key is passwords.
magento 2 data migration and how to find authentication keys

Install from GitHub

You can use GitHub to install the Data Migration Tool in Magento. Follow these steps to install the Data Migration Tool from GitHub:

  • Log in to your Magento server as the command-line user and navigate to the Magento 2 root directory.
  • Execute these commands in the terminal:
composer config repositories.data-migration-tool git https://github.com/magento/data-migration-tool
composer require magento/data-migration-tool:<version>
  • Replace the <version> tag with the current version of your Data Migration Tool. For example, if you have version 2.0.2, enter the following:
composer config repositories.data-migration-tool git https://github.com/magento/data-migration-tool
composer require magento/data-migration-tool:2.0.2

Wrapping It Up

Congratulations! If you followed the instructions, you should have successfully installed the Magento 2 Data Migration Tool.

However, this is only one of the steps in Magento migration. If you’re tech-savvy enough, you can migrate to Magento 2 yourself.

But if you lack the required experience, you’d better contact a reliable Magento agency to assist you, or opt for a safe Magento Database Migration Service as a starter:

magento 2 migration tool

2 COMMENTS

  1. Hey,
    This blog incredibly covers all the points To Install Data Migration Tool in Magento 2 . Thank you for writing such an informative blog.

LEAVE A REPLY

Please enter your comment!
Please enter your name here