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.0, you must also use the Data Migration Tool version 2.2.0.

Check your Magento 2 version

Composer metapackage

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

1
php <magento_root>/bin/magento --version

GitHub repository

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

1
cd <your Magento 2 clone directory>
1
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:

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

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

    For example, for version 2.2.0, enter:

    1
    
    composer config repositories.magento composer https://repo.magento.com
    
    1
    
    composer require magento/data-migration-tool:2.2.0
    
  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:

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

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

    For example, for version 2.2.0, enter:

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

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.

Related topics