The Most Popular Extension Builder for Magento 2

With a big catalog of 224+ extensions for your online store

How to Use Magento 2 Data Migration Tool?

It’s obvious that merchants who run stores on Magento 1 should move to Magento 2 as soon as possible. When Magento 1’s life ends, store owners will no longer get official security update patches and supports. Besides, Magento 2 is generally more advanced with more robust features compared to the earlier version.

One of the most popular ways to migrate Magento 1 to Magento 2 is to use the Data Migration Tool, which supports transferring data from Magento 1 to Magento 2 without making any effort. This post will show a detailed insight on the Data Migration Tool and how to use it to implement the migration.

Magento 2 Migration Service

Let’s unlock the latest features and functionalities, while protecting your store from security breaches!

Get free consultation
Magento 2 Migration Service by Mageplaza

Table of Contents

What is Magento Data Migration Tool?

What is Magento Data Migration Tool?
What is Magento Data Migration Tool?

Magento Data Migration Tool is a command-line interface supported by Magento that helps Magento 1.x store owners move their store to the new Magento 2.x. The tool validates consistency between Magento 1 and 2 database structures (tables and fields), monitors the data transfer progress, generates logs, and implements data verification tests.


  • It costs no fee for installation: You do not need to pay for anything regardless of the volume of data that you have to transfer.
  • Magento offers very detailed documentation and instructions: You can follow the steps in Magento’s detailed instructions during your migration process.
  • The tool enables you to migrate the newly added information in your source cart to the target one after the first migration with Magento Delta Migration. Nevertheless, it is crucial to notice that in the Delta mode, the Data Migration Tool transfers data generated only by Magneto’s extensions and is not responsible for the code or modules by 3rd-party developers.


  • Downtime on your source store: After the data migration, you need to set your Magento 1 system in maintenance mode to cut over the new website. As a result, your store will experience a period of downtime.
  • No official support: Magento does not offer any support personnel apart from the documentation. Hence, users are fully in charge of the outcome of their migration. Although users can reach out to the Magento community for help, they just get unofficial answers from other fellows.
  • Highly technical knowledge required: The process is immensely complex which can result in numerous errors which do not let your migration happen or lead to missing data.

How to use Magento 2 Data Migration Tool?

The tool runs in three different mode, including:

  • Settings: Migrate configuration settings
  • Data: Bulk migrate important data in the database
  • Delta: Transfer incremental data updates added to Magento 1 storefront and Admin Panel while operating previous migration mode.

Step 1: Install the Data Migration Tool

1. Install the Data Migration Tool

First, you need to update composer.json in the Magento root installation directory to offer the location of the Data Migration Tool package. Look at the process of installation via Github as an example.

  • Log in to your Magento server or go to the Magento file system owner
  • Switch to Magento 2 root directory
  • Add the following commands:

composer config git composer require magento/data-migration-tool

2. Have a check on the version of the installed Data Migration Tool

Do these steps:

  • Switch to your Data Migration Tool directory


  • Open composer.json

The version of the Data Migration Tool is the version entry in that file.

Notice that each Magento version requires a different PHP version. For instance, to use Magento ver 2.3.4, you will need the PHP ver7.3.

Step 2: Configure the migration

1. Backup target store’s database

Enter the command:

Mysqldump -uadmin -p databasename target> databasename target.sql

2. Configure the migration

Before transferring any data, you have to generate a config.xml configuration file from the provided sample. There are two ways to configure the Data Migration Tool for migration:

  • Configure migration in the vendor folder
  • Configure migration in a different module

Here’s how to configure migration in a vendor folder:

  • Log in to your Magento server as the owner of the Magento file system owner
  • Switch to the following directory:


  • Add the command below to generate a config.xml from the given sample:

cp config.xml.dist config.xml

  • Open config.xml in a text editor

  • The config.xml file must include access information to Magento 1 and Magento 2 databases and encryption keys:

config.xml file
config.xml file

Optional parameters include:

  • Database user password: password=
  • Database custom port: port=
  • Table prefix: ,

For instance, if the username of your database owner is rooted with a password pass and you utilize the prefix Magento 1 in your M1 database, employ the following in config.xml:


When completed, save your changes to config.xml and leave the text editor.

Step 3. Migrate using the Data Migration Tool

1. Transfer settings

To begin the settings migration, apply:

**bin/magento migrate:settings [-r –reset] {}**

In which:

  • [-r –reset] is an optional argument that begins migration from the start. You can employ this argument for testing migration.
  • {} is the absolute file system path to the migration tool's xml file; this argument is needed.

The migration finished message is shown after the settings are migrated successfully.

2. Transfer data

To start the data migration, apply this command:

**bin/magento migrate:data [-r –reset] [-a –auto] {}**

In which:

  • [-r –reset] is an optional argument that begins migration from the start. You can employ this argument for testing migration.
  • [-a –auto] is an optional argument that saves migration from stopping when it comes across integrity check errors.
  • {} is the file system path to config.xml; this argument is needed.

3. Transfer changes

Delta functionality is in charge of migrating the rest of the data that was included after the main migration. After the main migration, extra data could have been included in the Magento 1 database (for instance, by shoppers on the storefront). To monitor this data, the tool creates the database triggers for tables at the beginning of the migration process.

To run recent data, apply the following command line:

**bin/magento migrate:delta [-r –reset] {}**

Step 4: Implement post-migration checkup

There are some errors that you might face when migrating data with this data. To prevent your data from being missed out along the way, it is vital to check all the entities of your store from both frontend and backend to recognize any errors and get them fixed.


As there will be no more support for Magento 1, the need for migration from Magento 1 to Magento 2 is increasing. We have walked through the step-by-step guideline of how to migrate with the Magento 2 Data Migration Tool. Hope that this post has brought you the information that you are finding.

Just make sure that you implement the migration process carefully. A minor mistake can lead to catastrophic consequences, such as lost data, website downtime, and security breaches. If you’re not confident enough, it’s recommended to have experts help you.

With the help of certified developers from Mageplaza, you can elimininate any chances of errors. We’ll transfer your store data from the older version to the latest one accurately and securely. Besides, during the migration process, you’ll experience zero downtime because, as an enterprise, we understand time is money.

We also offer free 60-day support after our Magento migration service. Contact us for free consultations now!


Looking for
Customization & Development Services?

8+ years of experiences in e-commerce & Magento has prepared us for any challenges, so that we can lead you to your success.

Get free consultant
development service

    Explore Our Products:


    Stay in the know

    Get special offers on the latest news from Mageplaza.

    Earn $10 in reward now!

    Earn $10 in reward now!

    go up