{"id":1192,"date":"2025-06-06T09:41:06","date_gmt":"2025-06-06T04:11:06","guid":{"rendered":"https:\/\/meetanshi.com\/blog\/2020\/08\/22\/install-magento-2-data-migration-tool\/"},"modified":"2025-06-06T09:54:28","modified_gmt":"2025-06-06T04:24:28","slug":"install-magento-2-data-migration-tool","status":"publish","type":"post","link":"https:\/\/meetanshi.com\/blog\/install-magento-2-data-migration-tool\/","title":{"rendered":"How to Install Magento 2 Data Migration Tool &#8211; Tutorial\u00a0"},"content":{"rendered":"\n<p class=\"wp-block-paragraph\">Migrating from Magento 1 to Magento 2 using a Magento 2 data migration tool helps to move all your products, customers, orders, and other data more efficiently.&nbsp;<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">In this blog, I will show you the available migration methods and how to install the Magento 2 data migration tool using both methods.&nbsp;<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Data Migration Tool Requirements<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">Here are the key requirements before using the Magento Data Migration tool:&nbsp;<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li><a href=\"https:\/\/meetanshi.com\/blog\/check-magento-version\/\">Check your Magento version<\/a> and make sure it has the same vision as Magento 2 as the Data Migration Tool. If you use Magento 2.3.5, the data migration tool must follow the same version.&nbsp;<\/li>\n\n\n\n<li>Use a topology and design that matches your Magento 1 store.<\/li>\n\n\n\n<li>Verify that the Digital Migration Tool has network access to easily connect with Magento 1 and 2 databases.<\/li>\n\n\n\n<li>Your MySQL has the necessary privileges to access Magento databases.&nbsp;<\/li>\n<\/ul>\n\n\n\n<h2 class=\"wp-block-heading\">Methods to Install Magento 2 Data Migration Tool<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">There are two methods to configure the data migration tool: <strong>Official repositories<\/strong> and <strong>GitHub repositories<\/strong>.<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li><strong>Official Repositories: <\/strong>This method uses Composer to install the data migration tool, and this is a recommended method to ensure compatibility between your Magento 2 version and the tool.&nbsp;<\/li>\n\n\n\n<li><strong>GitHub Repositories:<\/strong> Here, you can install the tool by cloning it directly from the official Magento GitHub repository. You can use this method for development or to explore the source code.&nbsp;<\/li>\n<\/ul>\n\n\n\n<h2 class=\"wp-block-heading\">Steps to Install Data Migration Tool: Using Repositories<\/h2>\n\n\n\n<h3 class=\"wp-block-heading\">Step 1: Check the CLI Version&nbsp;<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">If you have downloaded the Magento using Composer metapackage, run the below command:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>$ php &lt;magento_root&gt;\/bin\/magento \u2013version<\/code><\/pre>\n\n\n\n<h3 class=\"wp-block-heading\">Step 2: Add Magento Repository to Composer<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">Login to your Magento server or switch the Magento file system owner and navigate to the Magento 2 root directory.&nbsp;<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Then, run the below command:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>$ composer config repositories.magento composer https:\/\/repo.magento.com<\/code><\/pre>\n\n\n\n<h3 class=\"wp-block-heading\">Step 3: Install Data Migration Tool<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">Now install the data migration tool based on the version you are using:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>$ composer require magento\/data-migration-tool:&lt;version&gt;Here, &lt;version&gt; is the version of the Magento 2 codebase.<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">Replace &lt;version&gt; with the exact Magento version, for example, Magento 2.4.7.&nbsp;<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Then, enter the authentication keys with your username and password.&nbsp;<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Install Magento 2 Data Migration Tool via GitHub<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">Step 1: Check Magento 2 Git Branch<br>If you cloned the <a href=\"https:\/\/meetanshi.com\/blog\/create-a-github-repository\/\">Magento 2 Github repository<\/a>, run these commands:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>$ cd &lt;your Magento 2 clone directory&gt;\n$ git branch<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">Step 2: Add the Data Migration Tool&nbsp;<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Now login to the Magento servers or switch to Magento file system owner.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Change to the Magento 2 root directory and run the below commands<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>$ composer config repositories.data-migration-tool git https:\/\/github.com\/magento\/data-migration-tool\n$ composer require magento\/data-migration-tool:&lt;version&gt;Here, &lt;version&gt; is the version of the Magento 2 codebase.<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">After completing the installation process, check the version of your Magento migration tool.&nbsp;<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Here are the steps to check the version:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Change to your Data Migration Tool directory: &lt;vendor&gt;\/magento\/data-migration-tool.<\/li>\n\n\n\n<li>Open <a href=\"https:\/\/github.com\/magento\/data-migration-tool\/blob\/2.4\/composer.json\" target=\"_blank\" rel=\"noopener\">composer.json<\/a> in a text editor.<\/li>\n\n\n\n<li>The version entry in that file is the version of the Data Migration Tool.<\/li>\n<\/ul>\n\n\n\n<div class=\"wp-block-simple-alerts-for-gutenberg-alert-boxes sab-alert sab-alert-primary\" role=\"alert\">Hire a<a href=\"https:\/\/meetanshi.com\/hire-magento-developer.html\"> dedicated Magento Developer<\/a> to manage this task!<button type=\"button\" class=\"close\" data-dismiss=\"alert\" aria-label=\"Close\"><span aria-hidden=\"true\">\u00d7<\/span><\/button><\/div>\n\n\n\n<h2 class=\"wp-block-heading\">Error Messages While Using the Data Migration Tool (Cause + Solution)&nbsp;<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">While configuring the tool, you might encounter some errors. Here are the possible errors with its cause and solution.&nbsp;<\/p>\n\n\n\n<figure class=\"wp-block-table\"><table class=\"has-fixed-layout\"><tbody><tr><td>Error Message&nbsp;<\/td><td>Cause&nbsp;<\/td><td>Solution&nbsp;<\/td><\/tr><tr><td><li>bash Source documents are not mapped: &lt;EXTENSION_TABLE&gt;<\/li><\/td><td>Some Magento 1 entities don&#8217;t exist in the Magento 2 database&nbsp;<\/td><td>Install Adobe Commerce 2 extension. Check if the error data originates from any extension.<\/td><\/tr><tr><td><li>Class &lt;extension\/class_name&gt; is not mapped in record &lt;attribute_id=196&gt;<\/li><\/td><td>A class from Adobe Commerce 1 codebase is not found in Adobe Commerce 2 codebase.&nbsp;<\/td><td>Install the extension and add class mapping using the class-map.xml.dist file.<\/td><\/tr><tr><td><li>There are duplicates in URL rewrites<\/li><\/td><td>The target path in a URL is paired with Request path + Store ID<\/td><td>Enable the auto_resolve_urlrewrite_duplicates option in your config.xml file.<\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n<h3 class=\"wp-block-heading\">Other Common Issues While Installing Magento 2 Data Migration Tool&nbsp;<\/h3>\n\n\n\n<ul class=\"wp-block-list\">\n<li><strong>Version Compatibility Issues<\/strong> &#8211; If your version doesn&#8217;t match the data migration tool, then the migration will stay incomplete.<\/li>\n\n\n\n<li><strong>Extension Compatibility Issues<\/strong> &#8211; Use <a href=\"https:\/\/meetanshi.com\/magento-2-extensions.html\">Magento 2 compatible extension<\/a> since the M1 extension won&#8217;t support M2.<\/li>\n\n\n\n<li><strong>Composer Conflicts<\/strong> &#8211; Solve any conflicting dependencies that can cause errors during installation.<\/li>\n\n\n\n<li><strong>Permission Access<\/strong> &#8211; Give proper read\/write access to your Magento directories.&nbsp;<\/li>\n<\/ul>\n\n\n\n<h2 class=\"wp-block-heading\">Hire Magento Migration Experts&nbsp;&nbsp;<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">Configuring Magento 2 data migration tool is an excellent choice to migrate your store data, but if not done correctly, there is a high chance that your migration will remain incomplete.&nbsp;<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Use our Magento 2 migration service to move to the latest version of Magento 2 without any data loss and minimum downtime. Our expert&#8217;s Adobe-certified experts make your new Magento store run without any uninterrupted errors.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><div class=\"meetanshi-cta\">\r\n\r\n<div class=\"cta-content-wrapper\">\r\n\r\n<span>Looking to switch to Magento 2?<\/span>\r\n\r\n<p>Get our expert migration services focused on security, zero data loss, and zero downtime. <\/p>\r\n\r\n<a href=\"https:\/\/meetanshi.com\/migration-services.html\" target=\"_blank\" class=\"btn-primary\">Migrate Now<\/a>\r\n\r\n<\/div>\r\n\r\n<div class=\"cta-image-new\">\r\n\r\n<img decoding=\"async\" src=\"https:\/\/meetanshi.com\/blog\/wp-content\/uploads\/2026\/01\/Migration-Service.png\" alt=\"Migration Service\">\r\n\r\n<\/div>\r\n\r\n<\/div><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Migrating from Magento 1 to Magento 2 using a Magento 2 data migration tool helps to move all your products, customers, orders, and other data&#8230;<\/p>\n","protected":false},"author":5,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"footnotes":""},"categories":[34],"tags":[],"class_list":["post-1192","post","type-post","status-publish","format-standard","hentry","category-magento"],"acf":[],"_links":{"self":[{"href":"https:\/\/meetanshi.com\/blog\/wp-json\/wp\/v2\/posts\/1192","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/meetanshi.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/meetanshi.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/meetanshi.com\/blog\/wp-json\/wp\/v2\/users\/5"}],"replies":[{"embeddable":true,"href":"https:\/\/meetanshi.com\/blog\/wp-json\/wp\/v2\/comments?post=1192"}],"version-history":[{"count":6,"href":"https:\/\/meetanshi.com\/blog\/wp-json\/wp\/v2\/posts\/1192\/revisions"}],"predecessor-version":[{"id":17860,"href":"https:\/\/meetanshi.com\/blog\/wp-json\/wp\/v2\/posts\/1192\/revisions\/17860"}],"wp:attachment":[{"href":"https:\/\/meetanshi.com\/blog\/wp-json\/wp\/v2\/media?parent=1192"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/meetanshi.com\/blog\/wp-json\/wp\/v2\/categories?post=1192"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/meetanshi.com\/blog\/wp-json\/wp\/v2\/tags?post=1192"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}