Looking to migrate Magento 1 to Magento 2 using the data migration tool? This article will help you with all the ins and outs. First, you’ll need to make sure your server is configured with the correct PHP settings before running the data migration tool. Otherwise, you’ll run into errors like unsupported declare ‘strict_types’ and parse errors/syntax errors.

DATA MIGRATION TOOL

The second thing you’ll need to do is download the data migration tool from GitHub. Make sure to download the version that matches up to your Magento 2 installation. So if your Magento 2 installation is version 2.3.1, you’ll need to download the data migration tool 2.3.1.

Once you have downloaded the tool, you can then upload the file and extract it into your Magento 2 root directory.

Run Composer Using SSH

Using putty, login to your Magento 2 server. Don’t log in as a root/super user. See instructions here. Change your directory to your Magento 2 root directory. Once logged into Putty run the following composer code:

composer config repositories.data-migration-tool git https://github.com/magento/data-migration-tool

If you get the below error messages your server is not configured with the correct PHP version:

  1. Warning: Unsupported declare ‘strict_types’ in /home/(user)/public_html/(domain)/vendor/magento/inventory-composer-installer/src/Plugin.php on line 6
  2. Parse error: syntax error, unexpected ‘:’, expecting ‘;’ or ‘{‘ in /home/(user)/public_html/(domain)/vendor/magento/inventory-composer-installer/src/Plugin.php on line 55

To fix this issue check out this article, Solved: Unsupported Declare ‘Strict_Types’ and Parse Error: Syntax Error. Then run the above command again.

Create & Edit Config.xml File

Go to magento root directory/vendor/magento/data-migration-tool/etc/opensource-to-opensource/(magento 1 version)/ then copy config.xml.dist to config.xml. Enter your Magento 1 and Magento 2 credentials towards bottom of file.

Enter Magento Credentials

You will be asked for your Magento 1 encryption key. You can get this by going to /app/etc/local.xml of your Magento 1 installation and finding the crypt key about halfway down the page.

You’ll also be asked for your developer authentication keys. To get them, sign in to the Magento Marketplace. Go to your profile and then click Access Keys under My Products section. Please note your public key will be your username and the private key will be your password.

Enter Magento 1 and Magento 2 credentials into the newly created config.xml file.

Run Command to Migrate Magento

To run the command to migrate Magento, I had to run the following command: php bin/magento migrate:settings –auto path to your config.xml. I did run into several errors. One of the errors I ran into was the allow_url_fopen must be enabled in php.ini. Another error I came across was PHP Fatal error: Allowed memory size of 33554432 bytes exhausted. All of these were fixable, just check out the artlices we wrote including the fix.

Once the migration was complete we ran into a couple more errors. They were the products not appearing on the frontend. And an error message that read: Attention Something Went Wrong With Processing the Default View when filtering products and customers. But, no worries we included a fix for these too.

Elyssa McGregor

Hi! I'm Elyssa McGregor. I love helping people succeed online and promoting businesses with our wide range of promotional products. I have a love for search engine optimization (SEO) and getting companies out there on the world wide web. How can I help you?

View all posts

Add comment

Your email address will not be published.