Upgrade the Data Migration Tool

To make sure the versions of your current Magento 2 installation and the Data Migration Tool match exactly, you may need to upgrade the tool.

Prerequisites

Before upgrading the Data Migration Tool, you must:

  • Upgrade your Magento software to get the latest version

  • Back up the vendor/magento/data-migration-tool directory

  • Make sure that the Data Migration Tool version matches the Magento application version

Upgrade your Magento software

If you haven’t already done so, upgrade the Magento software.

Back up the vendor/magento/data-migration-tool directory

Before you upgrade the Data Migration Tool, back up at least the vendor/magento/data-migration-tool directory. During upgrade, it could be deleted and replaced by the updated code.

You can also back up the entire Magento codebase and database using the following command:

php <magento_root>/bin/magento setup:backup --code --db
WARNING
The vendor/magento/data-migration-tool directory contains your custom code. Failure to back it up means you can lose your customizations during upgrade.

Make sure versions match

The versions of the Data Migration Tool and your Magento software must match exactly. For example, Magento 2.1.2 requires version 2.1.2 of the Data Migration Tool.

See the Install Data Migration Tool topic to know how to:

  • Check your Magento 2 version

  • Find released versions of the Data Migration Tool

  • Check the Data Migration Tool version

Upgrade the Data Migration Tool

  1. Log in to your application server as, or switch to, the file system owner.

  2. Change to the application root directory.

  3. Enter the following command:

    code language-bash
    composer require magento/data-migration-tool:<version>
    

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

    For example, for version 2.1.2, enter:

    code language-bash
    composer require magento/data-migration-tool:2.1.2
    
  4. Wait while the command completes.

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