Data Migration Toolをインストール
Magento 2とData Migration Toolの両方で 同じリリースバージョン を使用していることを確認してください。 例えば、Magento バージョン 2.2.0の場合、Data Migration Tool バージョン 2.2.0も使用する必要があります。
バージョンを確認
お使いのMagentoのバージョンを確認するには、次のいずれかの方法をご利用ください。
Composer メタパッケージ
Composer メタパッケージを使用してMagento ソフトウェアをダウンロードした場合は、次のコマンドを入力します。
php <magento_root>/bin/magento --version
GitHub リポジトリ
Magento 2 GitHub リポジトリをクローンした場合は、次のコマンドを入力します。
cd <your Magento 2 clone directory>
git branch
現在develop ブランチにいる場合は、続行する前に リリースブランチ に変更する必要があります。
Adobe Commerce ソフトウェアをまだインストールしていない場合は、今すぐインストールしてください。
GitHub リポジトリをクローンする場合は、 (Contributor)の説明に従ってリリースタグをチェックアウトし、GitHub リポジトリをクローンしてください。
Data Migration Toolのリリース済みバージョンを検索
Data Migration Tool GitHub リポジトリの リリース ページに移動して、使用可能なリリース済みバージョンを確認します。
Data Migration Toolをインストール
Data Migration Toolは次の場所からインストールできます。
インストールする前に、次のことを確認してください。
repo.magento.comからインストール
Data Migration Toolをインストールするには、Magento ルート インストール ディレクトリのcomposer.jsonを更新して、Data Migration Tool パッケージの場所を指定する必要があります。
-
ファイルシステム所有者としてアプリケーションサーバーにログインするか、切り替えます。
-
アプリケーションのルートディレクトリに移動します。
-
次のコマンドを入力します。
code language-shell composer config repositories.magento composer https://repo.magento.comcode language-shell composer require magento/data-migration-tool:<version>ここで、
<version>はMagento 2 コードベースのバージョンと一致する必要があります。例えば、バージョン 2.2.0の場合、次のように入力します。
code language-shell composer config repositories.magento composer https://repo.magento.comcode language-shell composer require magento/data-migration-tool:2.2.0 -
プロンプトが表示されたら、認証キーを入力します。 公開鍵はユーザー名、秘密鍵はパスワードです。
GitHubからインストール
GitHub リポジトリをクローンした場合は、次の手順に従ってData Migration Toolをインストールします。
-
ファイルシステム所有者としてアプリケーションサーバーにログインするか、切り替えます。
-
アプリケーションのルートディレクトリに移動します。
-
次のコマンドを入力します。
code language-shell composer config repositories.data-migration-tool git https://github.com/magento/data-migration-toolcode language-shell composer require magento/data-migration-tool:<version>ここで、
<version>はMagento 2 コードベースのバージョンと一致する必要があります。例えば、バージョン 2.2.0の場合、次のように入力します。
code language-shell composer config repositories.data-migration-tool git https://github.com/magento/data-migration-toolcode language-shell composer require magento/data-migration-tool:2.2.0
インストール済みData Migration Toolのバージョンを確認してください
-
Data Migration Tool ディレクトリ
<vendor>/magento/data-migration-toolに変更します。 -
composer.jsonをテキストエディターで開きます。 -
このファイルの
versionエントリはData Migration Toolのバージョンです。