Please find below precondition before start data migration from magento 1 to magento 2
Go magento2 root directory and install data migration tool using below command.
Note : In the above CLI command, <version> refers to the version of Data Migration Tool which must match with the Magento 2 version discovered earlier.
If you are getting below error then update your php version.
If you want to migrate data from Magento 1 Community Edition to Magento2 Community Edition then go to following path for configuration.
If you want to migrate data from Magento1 Comunity Edition to Magento2 Enterprise Edition then go to following path for configuration.
If you want to migrate data from Magento1 Enterprise Edition to Magento2 Enterprise Edition then go to following path for configuration.
(1) After the installation, the following directories will contain mapping and configuration files for the Data Migration Tool:
(2) Then change below file name of data migration tool in below directory.
(I) Go to “/opt/lampp/htdocs/Magento222/vendor/magento/data-migration-tool/etc/opensource-to-opensource/188.8.131.52” directory and the change file name from config.xml.dist to config.xml using below command.
(II) Go to “/opt/lampp/htdocs/Magento222/vendor/magento/data-migration-tool/etc/opensource-to-opensource” directory and change the file name from settings.xml.dist to settings.xml using below command.
(3) If you are using localhost then go to “/opt/lampp/etc” directory and change “max_allowed_packet” size from 1M to 50M in my.cnf file.
(4) Database configuration of magento1 and magento2.
Go to “/opt/lampp/htdocs/Magento222/vendor/magento/data-migration-tool/etc/opensource-to-opensource/184.108.40.206″ directory and open config.xml file.
Then change host name, database name and database user.
<database host=”127.0.0.1″ name=”Magento1-DB-name” user=”DB-username” password=”DB-password”/>
<database host=”127.0.0.1″ name=”Magento2-DB-name” user=”DB-username” password=”DB-password”/>
Then copy key from “/opt/lampp/htdocs/Magento1version(magento1937)/app/etc/local.xml” file and add key between Magento1-Encrypted-Key tag.
When Finished, save the config.xml and you are done!
To start migrating the data, navigate to your Magento 2 root directory via SSH terminal and run the following commands consecutively.
(1) Migrate settings
The Settings mode migrates stores, website, and system configuration like shipping, payment, tax settings, etc. According to our data migration order, you should migrate settings first.
(2) Migrate data
php bin/magento migrate:data --auto vendor/magento/data-migration-tool/etc/opensource-to-opensource/220.127.116.11/config.xml
(3) Migrate changes
Incremental migration enables you to migrate only changes made in Magento1 since the last time you migrated data.
php bin/magento migrate:delta --auto vendor/magento/data-migration-tool/etc/opensource-to-opensource/18.104.22.168/config.xml
Transfer magento 1 media folder to magento 2 in “<magento2rootdirectory>/pub/media” directory and run following commands
Once all migration processes are completed, don’t forget to test the Magento2 store completely to ensure everything functions properly.