Install Data Migration Tool

Prerequisite: Versions of Magento and Data Migration Tool must match

Make sure you are using the same released version of both Magento 2 and the Data Migration Tool. For example, for Magento version 2.2, you must also use the Data Migration Tool version 2.2.

Check your Magento 2 version

Composer metapackage

If you downloaded the Magento software using a Composer metapackage, enter the following command:

php <your Magento install dir>/bin/magento --version

Github repository

If you cloned the Magento 2 GitHub repository, enter the following commands:

cd <your Magento 2 clone directory>
git branch

If you’re currently in the develop branch, you must change to a released branch before you continue.

If you haven't installed the Magento software yet, install it now.

If you're cloning the GitHub repository, make sure you check out a release tag as discussed in (Contributor) Clone the Magento repository.

Find released versions of Data Migration Tool

Go to the Releases page of the Data Migration Tool Github repository to find available released versions.

Install Data Migration Tool

You may install the Data Migration Tool from:

Before installing, make sure you have:

Install from repo.magento.com

To install the Data Migration Tool, you must update composer.json in the Magento root installation directory to provide the location of the Data Migration Tool package.

  1. Log in to your Magento server as, or switch to, the Magento file system owner.
  2. Change to Magento 2 root directory.
  3. Enter the following commands:

    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.2, enter:

    composer config repositories.magento composer https://repo.magento.com
    composer require magento/data-migration-tool:2.2
    
  4. When prompted, enter your authentication keys. Your public key is your username; your private key is your password.

Install from GitHub

If you’ve cloned Magento 2 from the GitHub repository, follow the steps below to install the Data Migration Tool.

  1. Log in to your Magento server as, or switch to, the Magento file system owner.
  2. Change to Magento 2 root directory.
  3. Enter the following commands:

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

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

    For example, for version 2.2, enter:

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

Check version of installed Data Migration Tool

  1. Change to your Data Migration Tool directory: <vendor>/magento/data-migration-tool.

  2. Open composer.json in a text editor.

  3. The version entry in that file is the version of the Data Migration Tool.