Data Migrate From Magento 1 to Magento 2

Posted on 9 June, 2017

If you think about Magento Migration then you are certainly at the right place. In Magento Migration process there is a main four type of migration process Data Migration, Extension Migration, Customizations Migration and Theme Migration. In this technical note, we'll let you know the process of Data Migration. Before starting this process you must know which type of data migrate while doing data migration process.

Data Migrate will include all the information stored in your site, covering your database belonging to that Magento instance. All the important stuff like orders, customers, products, configuration settings will be beautifully transferred to your new site. This is the base stage where all the default data of Magento will be operated.

Below are the list of data which migrate on data migration

- Websites, stores, store views
- Product categories and their settings
- Products that covers content, core attributes and such other settings.
- Product Reviews
- Catalog URL Rewrites
- Customers and their orders, invoices, shipments, credit memos.
- Transactions
- Attributes and values
- Attribute sets
- Taxes
- Catalog and shopping cart price rules
- All the important Newsletter & CMS data
- Currencies, user accounts and roles

Before you start Migration process make sure Magento 1 (Your current site) and Magento 2 (Fresh installation) both are on the same server.

Note: For data security purpose we’ll suggest you take your database and source backup before you perform following steps. You can perform all of these steps with your own risk this site is not responsible for any loss or damage.

Let’s Start

First, you need to open Command line in folder root of Magento and run below commands one by one.

composer update

After complete composer update process run below command

composer config git

After complete above command process run the below command but before run that command you just need to changes data-migration-tool:2.1.5 latest version.

composer require magento/data-migration-tool:2.1.5

After run above command it was copy migration tool at Magento Root/vendor/magento/data-migration-tool. Before run next command you need to change in config.xml file. For Change in config file first you need to know about you Magento 1 version and navigate to the folder same as Magento 1 current version. For Ex : Your current Magento 1 version and its Community Edition then you need to go to the Magento 2 Root/vendor/magento/data-migration-tool/etc/ce-to-ce/ file and rename to config.xml and open and edit config.xml file.

Find following code on config file and change Magento 1 and Magento 2 host, database name, user and password.

    <database host="" name="magento1" user="root" password="pass"/>
    <database host="" name="magento2" user="root" password="pass"/>

Also, find another code on same file if you use prefix on your Magento 1 database.

// Find
<source_prefix />
// Change to

Also, find another code on same file and add crypt_key of your Magento 1. You’ll get this key from your Magento 1 Root/app/etc/local.xml and find and copy that key from that file and paste it between crypt_key as per following example.

// Find
<crypt_key />
// Change to

After Made all the changes on config.xml file run following both commands one by one.

php bin/magento migrate:settings vendor/magento/data-migration-tool/etc/ce-to-ce/

php bin/magento migrate:data --reset vendor/magento/data-migration-tool/etc/ce-to-ce/

You can use -r or --reset. -r or –reset is an optional argument that starts migration from the beginning. You can use this argument for testing migration.

If completed all this steps successfully then congratulation you are successfully Migrate data from Magento 1 to Magento 2.

After you have completed your migration and thoroughly tested your new Magento 2 site, perform the following tasks:

- Flush all Magento 2 cache types
- Reindex all Magento 2 indexers

After completed data migration incase if you want to do Delta migration then run following command on command line.

Delta is used for incremental migration. Incremental migration enables you to migrate only the changes made in Magento 1 since the last time you migrated data. These changes are:

– Data that customers added via storefront (created orders, reviews, changes in customer profiles, etc.)
– All operations with orders in the Magento Admin panel

php bin/magento migrate:delta vendor/magento/data-migration-tool/etc/ce-to-ce/

Site migration from Magento 1 to Magento 2 requires accuracy if you are not comfortable with the migration process. We can help you convert your site to Magento 2 so that you can be benefited from Magento 2 features. Contact us Now!

We hope you easy to understand this Magento technical note with above steps and you are successfully Migrate data from Magento 1 to Magento 2. See you again in our next note. Bookmark it for your future reference. Do comment below if you have any other questions or doubts on Migrate Data from Magento 1 to Magento 2.

P.S. Do share this Post with your team.

Mayank Zalavadia , eCommerce Project Manager

Magento Technical Notes

About Emipro

Being an emerging leader in IT market since 2011, Emipro Technologies Pvt. Ltd. has been providing a wide range of business solutions in Odoo & Magento. We are pleased to have a large pool of contented customers with our meticulous work in the domain of ERP & e-Commerce. Our customers are companies of all sizes ranging from startups to large enterprises who realize that they need a professional internet solution to generate revenue streams, establish proper communication channels, to achieve desired goals and streamline business operations. [....] Read More

Our writings seems informative ?

Subscribe for our Magento Technical Notes and get more amazing stuff directly to your inbox!

Post Your Review


Your Review has been posted

1 Comment(s)

Rakesh Savaliya

Posted on 26 June, 2017

This technical note is really helpful!