Magento 2 is based on a better code that makes Magento 2 easier and flexible to use. Besides, It also supports efficient APIs, theming capabilities, and turnkey extensions. As you are probably aware of, Magento 2 will come with a brand new architecture and database design. To ease up upgrade process, Magento released official Data Migration Tool that will help developers migrate store data from Magento 1 to Magento 2.
Data Migration Tool transfers data from M1 database to the M2 database based on a set of rules defined in XML files. To be clear, this tool only transfers data. Themes and customizations of your store can’t be automatically changed or migrated to Magento2. Migration tool migrates can migrate all-settings, products, categories, orders, customers, product review and linked-product relation(cross-sell, related products) etc. Basically, it migrates everything. If you have multiple stores, It can migrate all stores and linked data with all the stores. You can delete/filter migrated data on Magento2 store.
It is highly recommended to create a backup of the Magento 1 database and to truncate all the log tables before upgrading the website.
1. First, change/increase PHP memory limit, max execution time, max input vars, max input time
2. Hit composer update command to update all the local repo
3. Run below command to install migration tool
composer config repositories.data–migration–tool git https://github.com/magento/data-migration-tool
composer require magento/data–migration–tool:<M2 version>
(composer config repositories.magento composer https://repo.magento.com
composer require magento/data–migration–tool:2.2.2)
4. Go to your vendor/magento/data–migration–tool/etc/opensource–to–opensource/<magento 1 version folder>
5. rename config.xml and map.xml [remove dist]
6. Change source and destination DB in config.xml
<database host=“localhost” name=“m1databasename” user=“root” password=“password” />
<database host=“localhost” name=“m2databasename” user=“root” password=“password” />
7. Remove .dist from config.xml from <option>
8. Remove .dist from file name vendor/magento/data–migration–tool/etc/opensource–to–opensource
9. php bin/magento migrate:settings –r –a vendor/magento/data–migration–tool/etc/opensource–to–opensource/18.104.22.168(M1 Version)/config.xml
10. php bin/magento migrate:data –r –a vendor/magento/data–migration–tool/etc/opensource–to–opensource/22.214.171.124(M1 Version)/config.xml
11. php bin/magento migrate:delta –r –a vendor/magento/data–migration–tool/etc/opensource–to–opensource/126.96.36.199(M1 Version)/config.xml