Migration overview

Before you start migration, stop all Magento 1 cron jobs.

During the migration process, follow these general rules for a successful migration:

  1. Do not make changes in the Magento 1 Admin, except for order management (shipping, creating invoice, and credit memos)
  2. Do not alter any code
  3. Do not make changes in the Magento 2 Admin and storefront
TIP
All operations in the Magento 1 storefront are allowed.

Run the Data Migration Tool

This section shows how to run the Data Migration Tool to migrate settings, data, or incremental changes.

First steps

  1. Log in to the application server as, or switch to, a user with permissions to write to the file system. See switch to the file system owner.

    If you use the bash shell, you can use the following syntax to switch to the file system owner and enter the command at the same time:

    code language-bash
    su <file system owner> -s /bin/bash -c <command>
    

    If the file system owner does not allow logins, you can do the following:

    code language-bash
    sudo -u <file system owner>  <command>
    
  2. To run Magento commands from any directory, add <magento_root>/bin to your system PATH.

    Because shells have differing syntax, consult a reference like unix.stackexchange.com.

    Sample bash shell for CentOS:

    code language-bash
    export PATH=$PATH:/var/www/html/magento2/bin
    

    Optionally, you can run the commands in the following ways:

    • cd <magento_root>/bin and run them as ./magento <command name>
    • <magento_root>/bin/magento <command name>
    • <magento_root> is a subdirectory of your web server docroot.

Command syntax

Below is a typical command example:

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

Where:

  • <mode> may be: settings, data, or delta
  • [-r|--reset] is an optional argument that starts migration from the beginning. You can use this argument for testing migration.
  • [-a|--auto] is an optional argument that prevents migration from stopping when it encounters integrity check errors.
  • {<path to config.xml>} is the absolute file system path to config.xml; this argument is required.
NOTE
Logs are written to the <magento_root>/var/ directory.

Migration order

When we created the Data Migration Tool, we assumed the following data transfer sequence:

We strongly recommend migrating data in the same order.

recommendation-more-help
c2d96e17-5179-455c-ad3a-e1697bb4e8c3