As Magento 1 is coming to an end of its support and Magento 2 takes place, it’s high time for businesses, especially retailers to head for Magento migration. This migration, nevertheless, may seem to be a nightmare to many in retailers. We want to make this transition easier for you.

Why Migrate to Magento 2?

  • Magento has stopped rolling out any new features in the Magento 1.x versions now, except for the security updates.
  • Magento team will stop the official support for the Magento 1.x versions and stop releasing new security updates after 2020.
  • All the customizations you will be doing on your Magento 1.x version will have to be repeated in the Magento 2.x version, whenever you go for Magento 2 upgrade.

READ NOW. How to migrate from Magento 1 to Magento 2?

Install & configure Magento data migration tool

Magento 2 introduces its official migration tool to help merchants migrate data from Magento 1 to Magento 2 easier. You can follow the below steps or download Magenest Free Migration tool.

Step 1: Setup Magento 2 Instance

Download Magento 2 from https://www.magentocommerce.com/download without the sample data. Extract the downloaded data and follow the setup wizard to install the platform. Now, you have Magento 2 setup with an empty database. The data will be migrated in the database of this Magento 2 instance.

Step 2: Install Data Migration Tool

Open the command line in the root folder of Magento 2. Download the data migration tool in the newly set up Magento 2, by following the command:

composer config repositories.magento composer https://repo.magento.com
composer require magento/data-migration-tool:<version>

where <version> must match the version of the Magento 2 codebase.

For example, for version 2.3.0, enter:

composer config repositories.magento composer https://repo.magento.com
composer require magento/data-migration-tool:2.3.0

When prompted, enter your authentication keys. Your public key is your username; your private key is your password.

Step 3: Configuring the Data Migration Tool

Before you migrate any data, you must create a config.xml configuration file from the provided sample.

To create a configuration file:

  1. Log in to your Magento server as, or switch to, the Magento file system owner.
  2. Change to the following directory:
  3. Enter the following command to create a config.xml from the provided sample: cp config.xml.dist config.xml
  4. Open config.xml in a text editor.
  5. Specify the following at minimum:

For example, if your database owner’s username is root with password pass and you use the prefix magento1 in your Magento 1 database, use the following in config.xml:

<source>
    <database host="127.0.0.1" name="magento1" user="root"/>
</source>
<destination>
    <database host="127.0.0.1" name="magento2" user="root"/>
</destination>
<options>
    <crypt_key />
</options>

Work with configuration and mapping files

The Data Migration Tool uses mapping files to enable you to perform custom database mapping between your Magento 1 and Magento 2 databases, including:

  • Changing table names
  • Changing field names
  • Ignoring tables or fields

Adapt transferring data of a field to Magento 2 format

Mapping files for supported Magento versions are located in subdirectories of <your Magento 2 install dir>/vendor/magento/data-migration-tool/etc

To use the mapping files:

Rename or copy them to remove the .dist extension.

Edit them using the schema located in <your Magento 2 install dir>/vendor/magento/data-migration-tool/etc.

Then change config.xml in <options> node with the new name of the file.

The <your Magento 2 install dir>/vendor/magento/data-migration-tool/etc and <your Magento 2 install dir>/vendor/magento/data-migration-tool/etc/<ce version> directories contain the following configuration files:

Even though you will be working with map.xml.dist file most of the time, the following table discusses each mapping and other files.

Step 4. Migrate using Data Migration Tool

1. Migrate settings

Run the settings migration command:

To start migrating settings, run:

bin/magento migrate:settings [-r|--reset] {<path to config.xml>}

where:

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

{<path to config.xml>} is the absolute file system path to the migration tool’s config.xml file; this argument is required.

- The command should be:

sudo bin/magento migrate:settings /var/www/magento2/vendor/magento/data-migration-tool/etc/opensource-to-opensource/1.9.3.0/config.xml

2. Migrate data

- Run the data migration command:

To start migrating data, run:

bin/magento migrate:data [-r|--reset] [-a|--auto] {<path to config.xml>}

where:

[-a|--auto] is an optional argument that prevents migration from stopping when it encounters integrity check errors.

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

{<path to config.xml>} is the absolute file system path to config.xml; this argument is required.

The command should be:

sudo bin/magento migrate:data /var/www/magento2/vendor/magento/data-migration-tool/etc/opensource-to-opensource/1.9.3.0/config.xml

3. Migrate changes

- Run the incremental migration command:

To start migrating incremental changes, run:

bin/magento migrate:delta [-r|--reset] {<path to config.xml>}

where:

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

{<path to config.xml>} is the absolute file system path to config.xml; this argument is required.

- The command should be:

sudo bin/magento migrate:delta /var/www/magento2/vendor/magento/data-migration-tool/etc/opensource-to-opensource/1.9.3.0/config.xml

Now your database is successfully migrated to Magento 2.

Data that needs to be migrated manually

There are four kinds of data that need to be migrated manually:

  • Media
  • Storefront design
  • Admin user accounts
  • Access Control Lists (ACLs)

After Migration

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

  • Put Magento 1 in maintenance mode and permanently stop all Admin activities.
  • Start Magento 2 cron jobs.
  • Flush all Magento 2 cache types.
  • Reindex all Magento 2 indexers.

Hope you have a seamless data migration with our guideline in this blog! If you want to migrate your entire website, please check out our service here.