Amid the COVID-19 outbreak, Folio3 aims to help clinics serve patients with telemedicine effectively.

Data Migration from Magento 1 to Magento 2

Data Migration from Magento 1 to Magento 2
COMMENTS (0)
Tweet

magento migration

 

As you know, migration from Magento 1 to Magento 2 comprises of four key areas. These include Data migration, Extensions migration, Theme migration and migration of any customizations. In this post we’ll look at the data migration process. In this tutorial, I’ll be using the data migration tool provided by the Magento community, which is available at https://github.com/magento/data-migration-tool. The Magento versions used in this tutorial are:

  • Magento 1 version 1.9.2.4 (Magento Open Source)
  • Magento 2 version 2.1.5 (Magento Open Source)

Keep in mind that the Magento data migration process does not include the migration of:

  1. Media files on the file system (for e.g., images for products, categories, WYSIWYG editor, etc.)
  2. The store’s frontend design, including cascading style sheets, JavaScript or XML layouts, as these are implemented differently in Magento 2.
  3. Web Services API (SOAP, XML-RPC and REST) credentials and roles.

Preconditions

Before  you begin, you need to make sure that the following steps have been completed.

  • Install and setup the composer.
  • Set up a Magento 2 vanilla website instance and disable all the Cron jobs on it.
  • Check that the data migration tool has a network connection to both the Magento 1 and Magento 2 databases. The data migration tool should also be able to communicate with the databases.

Best Practices for a Successful Data Migration

Before you start the data migration process, stop all Magento 1 Cron jobs.

During the migration process, do not:

1. Make any changes in the Magento 1 Admin area, except for order management (shipping, creating invoice, credit memos, etc.).

2. Alter any code.

3. Make changes in the Magento 2 Admin or store front.

You can carry out all regular operations in your Magento 1 store front though (taking and fulfilling orders, etc.).

Magento 2 Data Migration Sequence

The data migration should carried out in the following manner.

1. Migrate Settings (migrate all stores, websites, and system configuration like shipping, payment and tax settings, etc. According to Magento’s own documentation, it is best practice to migrate the settings first).

2. Migrate Data

3. Migrate Delta Changes (Incremental migration enables you to migrate only the changes made in Magento 1 since the last time data was migrated)

Magento 2 Data Migration Steps

Step 1 – Download and configure the code migration tool

  • To do so, just navigate to the Magento 2 website root directory and run the following command to install the data migration tool.

composer require magento/data-migration-tool:2.1.5

magento migration

Step 2 – Configure the Magento 1 and Magento 2 databases.

  • Navigate to “vendor/magento/data-migration-tool/etc/ce-to-ce/1.9.2.4”
  • Rename the “config.xml.dist” file to “config.xml”.
  • Configure the database information (as depicted in the code snippet below). The <source> will contain the Magento 1 database, while the <destination> is the Magento 2 database

 

magento migration

  • Configure the “crypt_key” (as shown in the snippet below). The crypt key is located on the following path “<magento1_root_directory>/app/etc/local.xml “ 

 

magento migration

Step 3 – Configure the “settings.xml” in order to migrate settings .

  • Navigate to “vendor/magento/data-migration-tool/etc/ce-to-ce/”
  • Rename the “settings.xml.dist” file to “settings.xml”
  • Copy “the settings.xml” file to “vendor/magento/data-migration-tool/etc/ce-to-ce/1.9.2.4”
  • In the “config.xml” file , modify the “<settings_map_file>” key tag to the actual path of “settings.xml”
  • Make the changes in the “settings.xml” file as well
  • Launch the migration settings tool from the Magento 2 root directory, by typing in the following command.

 

magento migration

Step 4 – Configure “configure.xml” to migrate data.

  • Next, navigate to “vendor/magento/data-migration-tool/etc/ce-to-ce/<magento1_version>/
  • Rename the map.xml.dist file to map.xml.
  • In the config.xml file , update the <map_file> tag key to the full path of “map.xml”

 Similarly, do the same acitivity for all data migration steps given below.

  • Map Step
  • EAV Step
  • Customer Attributes Step
  • Map Step
  • Url Rewrite Step
  • Log Step
  • Ratings Step
  • Configurable Prices step
  • Order Grids Step

Once you’ve done that, launch the migration data tool from the Magento 2 root directory, by typing in the following command.

 

magento migration

magento migration

TroubleshootingErrors

If you see any of the following error messages, don’t worry, as they are simply referring to either data that’s missing or steps or part of the code which cannot be executed for some reason (the error and the reasons behind them are explained below, for each error).

1. [ERROR]: Source documents are not mapped: folio3_restorecancelled_order

This error simply means that these documents (i.e. the tables) cannot be migrated since they are not part of Magento’s core tables and they need to be ignored in the map.xml. To do that, just add the following code snippet inside the source <document_rules> tag in the map.xml file.

2[ERROR]: Source fields are not mapped.

Document: sales_flat_quote_item. Fields: orderspro_is_temporary?

This error indicates that these fields (i.e. columns) cannot be migrated, since they are not part of Magento’s core tables and as such, they need to be ignored in map.xml. To do that, just add the following code snippet inside the source’s <field_rules> tag in the map.xml file.

 

CALL

USA408 365 4638

VISIT

1301 Shoreway Road, Suite 160,

Belmont, CA 94002

Latest From Our Blog

Getting Started with Performance Testing Using ...

Getting Started with Performance Testing Using Apache Jmeter
May 10, 2022
  Performance testing plays an important role in application’s stability and scalability. We cannot make a product live without testing its pe...
Read more

Usability Testing on Mobile App

March 31, 2022
So let’s commence this discussion with a query. What do phone consumers spend most of their time on? On mobile apps? Yes, you read that correctly. ...
Read more

Integrated D365 and Magento 2.x in QA Life Cycle

March 30, 2022
  GOALS: The understanding of ERP and E-commerce integration as a QA Engineer. How to apply Requirement Elicitation techniques in this area of...
Read more