How to migrate data from Magento 1 to Magento 2 using data migration tool
Magento has shared Magento migration tool to upgrade Magento 1.x to Magento 2.x
You need to migrate your data, extension, themes and your custom code.
Hire Magento 2 Master to Migrate Your Magento Store.
Migration to Magento 2 involves four components: data, extensions, themes, and customizations.
How To Migrate Magento 1 to Magento 2
There is Three way to migrate Magento 1 to Magento 2.
1. Magento Extension
2. UB Theme Migration Tool
3. Magento Migration Tool
I will explain step by step to migrate Magento 2 using all above options
In this article, I will Explain how to migrate Magento 1 to Magento 2 using Magento Migration Tool
Magento released Magento Data Migration Tool on github to migrate default magento 1 data to magento 2.
Steps to Migrate Magento 1 to Magento 2
You need to follow following steps to complete the Successful migration with all your data and functionality.
1. Install Fresh & Latest Magento 2
2. Create a backup of live website of Magento 1
3. Data Migration
4. Extension Migration
5. Custom Code Migration
6. Theme Migration
7. Settings Migration & verification
8. Testing
9. Go Live
Step 1. Install Fresh & Latest Magento 2
You need to install the fresh and latest version of Magento 2.You can download it from git and install it from also composer.
Here is my article to install Magento 2 on your server
You can also follow the Magento installation steps guide
Step 2. Create a backup of live website of Magento 1
Create the backup of database and files of your live website and put it in the safe place.
Step 3. Magento Data Migration Tool
You install the Magento Data Migration Tool from git hub.Go to your Magento root directory and run the follwoing command
composer require magento/data-migration-tool:<version>
composer update
Step 3.1 Configure Magento 2 Data Migration Tool
After the installation is finished, the following directories will contain mapping and configuration files for the Data Migration Tool.
<Magento 2 root dir>/vendor/magento/data-migration-tool/etc/opensource-to-opensource
The above file will contain configuration and scripts for migrating from Magento 1 Open Source platform to Magento 2 Open Source platform.
<Magento 2 root dir>/vendor/magento/data-migration-tool/etc/opensource-to-commerce
The above file will contain configuration and scripts for migrating from Magento 1 Open Source platform to Magento 2 Commerce.
<Magento 2 root dir>/vendor/magento/data-migration-tool/etc/commerce-to-commerce
The above file will contain configuration and scripts for migrating from Magento 1 Commerce to Magento 2 Commerce.
You have to select the relative directory according to your Magento 1 type.If you are migrating data from open source to open source then go to following directory and rename the rename config.xml.dist to config.xml.
Next, open config.xml in your favorite code editor and specify the following:
<source>
<database host="localhost" name="Magento1-DB-name" user="DB-username" password="DB-password"/>
</source>
<destination>
<database host="localhost" name="Magento2-DB-name" user="DB-username" password="DB-password"/>
</destination>
<options>
<crypt_key>Magento1-Encrypted-Key</crypt_key>
</options>
Step 3.2 Migrate Settings Using Magento 2 Data Migration Tool
According to the Magento Data Migration Order, you should migrate settings first. To start migrating the settings, navigate to your Magento 2 root directory via SSH terminal and run the following command:
php bin/magento migrate:settings --reset <path to your config.xml>
-a for auto migration while ignoring errors.
Example
bin/magento migrate:setting -r -a vendor/magento/data-migration-tool/etc/opensource-to-opensource/1.9.1.0/config.xml
Step 3.3 Migrate Data Using Magento 2 Data Migration Tool
Data migration from Magento 1 platform to Magento 2 platform includes products, categories, orders, customers, wish lists, ratings, etc. To migrate data, run the following CLI command:
php bin/magento migrate:data --reset <path to your config.xml>
-a for auto migration while ignoring errors.
Example
bin/magento migrate:data -r -a vendor/magento/data-migration-tool/etc/opensource-to-opensource/1.9.1.0/config.xml
Once the data migration is complete, you will receive a success message.
Tip: Create 2-3 copy of your fresh Magento 2 database in case if you have any issue during migration you have to start the next try of migration with fresh Magento 2 database.