Do Migration From Magento 1 to Magento 2 in the Easy Way


Hello Friends,

In this blog, we will check how to Migrate Magento 1 website to Magento 2 with easy steps.

Before starting the migration, please check the below requirements.

  1. Put Magento 1 store on maintenance mode 
  2. stop all the activities that make any changes in the database.
  3. Stop all Cron Jobs in Magento 1
  4. Install & Setup Magento 2.3.3 in your system 
  5. Migrate all your Magento 1 extensions and customizations from version 1 to 2 (you can also find Magento2 extension on the marketplace).
  6. After installation, take the database backup so it easy to restore.
  7. We will use Code Migration Tool, which is provided by Magento.

I hope you have already installed & setup Magento 2 website in your system and take the database backup for future use.

Quick Tip:- How to Convert Custom Field From Quote to Order

Now, we will start with the migration, please check below steps:

Step 1: First, download the Data Migration Tool.

Now, go to the newly installed Magento 2 root folder and open the terminal so we can RUN the below command:

    RUN Command in your terminal and download 2.3.3 version migration tool
composer require Magento/data-migration-tool:2.3.3

We have installed the latest version 2.3.3 of data migration tool because we have Magento 2.3.3 codebase and it’s necessary 

migration tool version match with the version of the Magento 2 codebase.

After RUN the above command it will ask for the public key and your private key for authentication.

To get those keys, just sign in to your Magento eCommerce account and click on My Products > Access Keys. Here, you can easily create and get your keys.

Once, migration tool will installed then you can able to find it on the vendor/Magento folder else you can also download the data migration tool from Github.

Step 2: Now, setup the Data Migration Tool

Now, Under the vendor/Magento/data-migration-tool/etc folder you can see another subfolder:

  • ce-to-ce: It holds configuration files and scripts for migrating data from Magento 1 CE to Magento 2 CE
  • ce-to-ee: It holds configuration files and scripts for migrating data from Magento 1 CE to Magento 2 EE
  • ee-to-ee: It holds configuration files and scripts for migrating data from Magento 1 EE to Magento 2 EE

Now, go to that directory on which you are performing the migration.

For example: ce-to-ce folder

Now, you can see the Magento 1 folders with the version name. If you are migrating to Magento version then you should have to go to the folder

Then, just create the duplicate file of map.xml.dist and rename it to map.xml, in this folder.

Same as you need to create a copy of the file config.xml.dist and rename it to config.xml, in this folder. Open this file and perform the following changes to it:

	<database host="magento1host" name="magento1databasename" user="magento1databaseusername" password="magento1password" />
	<database host="magento2host" name="magento2databasename" user="magento2databaseusername" password="magento2password" />

1) Required Values:

Under source tag, add the Magento 1 database details, and in the destination add the Magento 2 database details.

The Crypt_key value can be found in the local.xml file which is located in the Magento 1 directory at app/etc/local.xml in the tag.

2) Optional Values:

If you don’t have a prefix for the Magento 1 and Magento 2 tables, then you can leave source prefix fields empty.


Database mapping between Magento 1 and Magento 2 databases is performed through mapping files which are located in:


These files are used for changing the table names, field names, ignoring tables and fields and transferring data of the field to the Magento 2 format.

We need to remove the .dist extension of these files to make use of these mappings.

After removing the .dist from file names, we need to change these file names (removing the .dist) in the config.xml file under the “options” tab.

Here you can see the location of the files that need to be renamed.

    Original file like this
    After modification in the file, it should be like this

Step 3: Now, RUN the migration commands.

1) Now, we will migrate all stores, system configurations, shipping, payment setting, etc.

Open your terminal and RUN below commands:

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

Once the above command is done then you will see the “migration complete” status.

2) Next, you need to run the data migration command:

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

The above command will check the consistency of tables and fields between Magento 1 and Magento 2. 

If any issue exists, then an error message will appear with a list of all tables and fields that are not mapped.

For example, you face an extension tables error and a particular custom field goes missing in one of the tables. So, to fix this problem you need to install the Magento 2 version of the extensions in the Magento 2 instance so that the missing tables are in the Magento 2 instance database as well.

You can also ignore the tables and fields by adding their entries in map.xml file

After making the entries, the corresponding tables and fields will be ignored and will not be migrated to the Magento 2 database.

Run the migration command again to verify that the issues are fixed.

The data migration is completed once you get the migration complete message.

Step 4: Update new changes via command

Once the migration is completed, if there are any new changes in the database, such as new orders are placed or new reviews are added, then you can migrate that data by running the below command:

php bin/magento migrate:delta /var/www/html/magento2/vendor/magento/data-migration-tool/etc/ce-to-ce/

You can also stop this command by pressing ctrl + C, or else it will keep on running.

Step 5: Final Commands

Now, your database is successfully migrated to Magento 2 and Finally, you need to copy the media files from Magento 1 to Magento 2 then just RUN below commands:

php bin/magento setup:upgrade
php bin/magento setup:di:compile
php bin/magento setup:static-content:deploy
php bin/magento cache:flush
php bin/magento indexer:reindex

Now, you can test your new Magento 2 site.

As I am a Magento eCommerce developer, I am wishing you also learn more about Magento website development from here. Explore your Magento development service with trustworthy resources.

Thanks for reading this post!

About the author

I’m Magento Certified Developer having quite 5 years of commercial development expertise in Magento as well as in Shopify. I’ve worked primarily with the Magento and Shopify e-commerce platform, managing the complexities concerned in building e-commerce solutions tailored to a client’s specific desires.

Related Posts

Leave a Reply