Magento 1 to Magento 2 Migration Process

Posted on January 21st, 2020

Magento has announced that they are going to stop the support for the Magento 1.x platform from June 2020. After the official goodbye of the Magento 1.x platform, those who fail to migrate it to Magento 2 won’t receive any security updates. The three critical components of Magento 1 to Magento 2 migration includes data, Extensions, and themes & customizations.

The steps to migrate Magento 1 to Magento 2 are as follows:


1) Setup Magento 2 Instance

1) Download the Magento 2 platform without the sample data.

2) Extract the downloaded data and then follow the setup wizard to install the Magento 2 platform.

3) The setup of Magento 2 with an empty database is complete now. The migrated data gets stored in this database.


2) Download the Data Migration Tool

Log in to the root folder of Magento 2 and open the command-line. In the Magento 2 platform, download the data migration from Magento 1 to Magento 2 tool by using the following command.

# composer require Magento/data-migration-tool:<Magento_version>

The version of the data migration tool should be compatible with the Magento 2 codebase. You can check the compatible version in the ‘composer.json’ file under the Magento 2 root directory.

For example, if the Magento version is 2.3.2, then the command would be:

# composer require Magento/data-migration-tool:2.3.2


This above command prompts for public and private key for authentication. You can get these keys values by the following steps:

1) Log in to the Magento eCommerce account.

2) After the login, navigate to the “My Accounts” section and click the developer’s link on the left menu.

3) Click on the security keys. Then, locate the public and private key.

You can also download the data migration tool from Github using the link:


3) Configure the Data Migration Tool

After the installation, you need to set the data migration configuration. Under the ‘data-migration-tool/etc’ folder, you can see the following subfolders.

1) ce-to-ce: This folder contains configuration files and scripts for migrating data from Magento 1 CE (Community Edition) to Magento 2 CE.

2) ce-to-ee: This folder contains configuration files and scripts for migrating Magento 1 CE  to Magento 2 EE (Enterprise Edition).

3) ee-to-ee: If you want to migrate the Magento 1 EE to Magneto 2 EE, then this folder contains the configuration files and scripts for the same.


You need to follow the below steps to configure the data migration tool:

1) Enter the directory for which you are performing the migration.

2) Next, enter the directory with the Magento 1 version name. For instance, if you are migrating to Magento version, then you should enter the folder name as

3) Make a copy of the ‘map.xml.dist’ file and rename it as ‘map.xml’. Paste the following content in the file.


<database host=”magento1host” name=”magento1databasename” user=”magento1databaseusername” password=”magento1password” />



<database host=”magento2host” name=”magento2databasename” user=”magento2databaseusername” password=”magento2password” />








4) Then you need to take a copy of the ‘config.xml.dist’ file and rename it to ‘config.xml’. Then open this file and make the following changes to the file:


Required Values:

Enter the Magento 1 database details under the source, and in the destination, you need to enter the Magento 2 database details. You can find the ‘Crypt_key’ value in the Magento 1 instance directory at ‘/app/etc/local.xml’ in the tag.


Optional Values:

You need to map the database through the mapping file located in the ‘/vendor/Magento/data-migration-tool/etc/’ folder. In this file, you need to change the table names, field names, ignoring tables, and fields and transferring data of the field to the Magento folder. Then you need to remove the .dist extension from the mapping file. In the ‘config.xml’ file, you need to add the following data.


















4) Migrate the Websites

You need to migrate the eCommerce store and system configuration like tax settings, payment gateways, shipping, and more. To migrate the website from Magento 1 to Magento 2, you need to run the following command.

# bin/magento migrate:settings [-r|–rest]{}

In the above command, the [-r|–rest] is an optional argument. This argument is used to start the migration from the beginning. The {} is the absolute path to config.xml file.

For example,

sudo bin/magento migrate:settings /var/www/magento2/vendor/magento/data-migration-tool/etc/ce-to-ce/

After the migration completes, you need to migrate the data using the following command.

# bin/magento migrate:data [-r|–rest] {}

This above command checks the consistency of tables and fields between Magento 1 and Magento 2. If you want to ignore any tables and fields, then you can add their entries in the map.xml file. Those tables and fields mentioned in the map.xml file do not migrate to Magento 2 database.

After completing the migration, if any new changes have happened in the database, such as new order placed, or new reviews added, then you need to run the following command to migrate that data into the database.

# bin/magento migrate:delta [-r|–rest] {}

After the migration, you need to copy all the media files from Magento 1 to Magento 2. Now you can use the Magento 2 platform for your eCommerce website.


If you need any further help, please do reach our support department.

Leave a Reply