{"id":54,"date":"2018-09-24T06:32:47","date_gmt":"2018-09-24T06:32:47","guid":{"rendered":"http:\/\/www.sureshselvam.com\/?p=54"},"modified":"2021-04-27T12:40:18","modified_gmt":"2021-04-27T12:40:18","slug":"data-migration-from-magento-1-x-to-magento-2-x","status":"publish","type":"post","link":"https:\/\/www.sureshselvam.com\/index.php\/2018\/09\/24\/data-migration-from-magento-1-x-to-magento-2-x\/","title":{"rendered":"Data Migration from Magento 1.X to Magento 2.X"},"content":{"rendered":"<p>Data Migration tool officially released by Magento for Community editions. For Enterprise edition only Partners can get the data migration tool.<\/p>\n<p>There is few rules for successful migration.<\/p>\n<ul>\n<li>Don\u2019t make any changes in Magento 1 admin except order Management.<\/li>\n<li>Stop all cron jobs in Magento 1<\/li>\n<li>Don\u2019t alter any code<\/li>\n<li>Don\u2019t make changes in Magento2 admin and storefront.<\/li>\n<\/ul>\n<p><strong>Supported Versions<\/strong><br \/>\nFollowing version are supported for Migration<\/p>\n<ul>\n<li>Community Edition (CE) version 1.6.x, 1.7.x, 1.8.x, 1.9.x<\/li>\n<li>Enterprise Edition (EE) version 1.11.x, 1.12.x, 1.13.x, 1.14.x<\/li>\n<\/ul>\n<p><a href=\"https:\/\/www.sureshselvam.com\/index.php\/2017\/09\/24\/data-migration-from-magento-1-x-to-magento-2-x\/m2-data-migration\/\" rel=\"attachment wp-att-56\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-56\" src=\"https:\/\/www.sureshselvam.com\/wp-content\/uploads\/2017\/09\/M2-Data-migration.jpg\" alt=\"\" width=\"578\" height=\"434\" srcset=\"https:\/\/www.sureshselvam.com\/wp-content\/uploads\/2017\/09\/M2-Data-migration.jpg 578w, https:\/\/www.sureshselvam.com\/wp-content\/uploads\/2017\/09\/M2-Data-migration-300x225.jpg 300w\" sizes=\"auto, (max-width: 578px) 100vw, 578px\" \/><\/a><br \/>\n<strong>Terminology in Migration Tool.<\/strong><br \/>\nThere are lot of differences in the structure and format of data between Magento 1 and Magento 2. In Map all those are declared. When the differences are not mentioned in Map, then we will get errors in data migration processing.<br \/>\nMap &#8211; set of rules that describe connections between Magento 1.x and Magento 2.0 data structures<br \/>\nMode \u2013 Mode of operation in Data Migration through basic commands.<\/p>\n<ul>\n<li>Settings &#8211; Migrates all possible configuration settings from 1.x to 2.x<\/li>\n<li>Data &#8211; Bulk migrates data from your Magento 1 DB to your Magento 2 DB<\/li>\n<li>Delta &#8211; Incremental \u201ccatch-up\u201d migration after the initial bulk data migration<\/li>\n<\/ul>\n<p><strong>Migration Plan<\/strong><\/p>\n<ul>\n<li>STEP 1: Review your current site (Extensions and Modules)<\/li>\n<li>STEP 2: Capacity Planning (Servers)<\/li>\n<li>STEP 3: Build and Test the Magento 2<\/li>\n<li>STEP 4: Start Your Migration<\/li>\n<li>STEP 5: Incremental Updates<\/li>\n<li>STEP 6: Go Live<\/li>\n<\/ul>\n<p><strong>Prerequisite<\/strong><br \/>\nInstall new Magento 2 environment in the server.<br \/>\nStop Magento2 cron Jobs<br \/>\nBackup the Magento 2 database.<br \/>\nCheck the data migration access to both Magento 1 and Magento 2 databases.<\/p>\n<p><strong> Installation, Configuration and Mapping<\/strong><br \/>\nData Migration tool is not an extension, it is shell app which requires Magento2 Framework to work. We can get data migration tool from git hub only for community edition.<\/p>\n<p><strong>Install from Github<\/strong><\/p>\n<ul>\n<li>composer config repositories.data-migration-tool git<\/li>\n<li>https:\/\/github.com\/magento\/data-migration-tool-ce<\/li>\n<li>composer require magento\/data-migration-tool:dev-master<br \/>\nAfter installation, the following directory contains mapping and configuration file<\/li>\n<li><em>&lt;your Magento 2 install dir&gt;\/vendor\/magento\/data-migration-tool\/etc\/ce-to-ce<\/em><\/li>\n<\/ul>\n<p><strong> Configuration.<\/strong><\/p>\n<ul>\n<li>Choose the right folder based on the Magento versions.<\/li>\n<li>Copy the config.xml.dist to config.xml<\/li>\n<\/ul>\n<p><em>&lt;source&gt;\u00a0\u00a0\u00a0 &lt;database host=&#8221;127.0.0.1&#8243; name=&#8221;magento11302&#8243; user=&#8221;root&#8221; password=&#8221;pass&#8221;\/&gt;&lt;\/source&gt;&lt;destination&gt;\u00a0\u00a0\u00a0 &lt;database host=&#8221;127.0.0.1&#8243; name=&#8221;magento2&#8243; user=&#8221;root&#8221; password=&#8221;pass&#8221;\/&gt;&lt;\/destination&gt;&lt;options&gt;\u00a0\u00a0\u00a0\u00a0 &lt;crypt_key&gt;f3e25abe619dae2387df9fs594f01985&lt;\/crypt_key&gt;&lt;\/options&gt;<\/em><\/p>\n<ul>\n<li>Source \u2013 Database details and its credentials of Magento 1.X,<\/li>\n<li>Destination \u2013 Database Details and it credentials of Magento 2.X<\/li>\n<li>crypt_key \u2013 Encryption key from Magento 1.X (local.xml).<\/li>\n<\/ul>\n<p><strong>Mapping Files<\/strong><br \/>\nData Migration tools uses mapping file to enable us to perform custom mapping between Magento 1 and Magento 2 which including changes in table name and field name, ignoring tables and fields and Transferring the table \/ field.<br \/>\nFollowing picture is an example of Map configuration file<\/p>\n<p><strong>MAP Steps<\/strong><\/p>\n<ul>\n<li>Based on the Configuration file chosen, copy the map.xml.dist to map.xml<\/li>\n<li>Make necessary changes in Config.xml<\/li>\n<li>Transferring most of data from Magento 1 to Magento 2<\/li>\n<li>This step reads instructions from map.xml<\/li>\n<\/ul>\n<p><strong>Areas:<\/strong><\/p>\n<ul>\n<li>Source &#8211; contains rules of source database<\/li>\n<li>Destination &#8211; contains rules of destination database<\/li>\n<\/ul>\n<p><strong>Options:<\/strong><\/p>\n<ul>\n<li>ignore &#8211; document, field or data type marked with this option will be ignored<\/li>\n<li>rename &#8211; describes name relations between documents with the different name. In a case when destination document name is not the same with the source document &#8211; you can use rename option to set source document name similar to destination table name<\/li>\n<li>move &#8211; sets rule to move specified field from source document to destination document. NOTE: destination document name should be the same with the source document name. If source and destination document names are<\/li>\n<li>different &#8211; you need to use rename option for document that contains moved field<\/li>\n<li>transform &#8211; is a option that allows user to migrate fields according to behavior described in handlers<\/li>\n<li>handler &#8211; describes transformation behavior for fields. To call the handler you need to specify<\/li>\n<\/ul>\n<p><strong>Run the Data Migration Tool<\/strong><br \/>\nCommand<br \/>\nbin\/magento migrate: [-r|&#8211;reset] {}<br \/>\n&#8211; settings \/ data \/ delta.<\/p>\n<p>The Data Migration Tool saves its current progress as it runs. If errors or user intervention stop it from running, the Data Migration Tool resumes progress at the last known good state.<\/p>\n<p><strong>Manual Migration (Media, Storefront design and ACLs)<\/strong><\/p>\n<p><strong>Media<\/strong><\/p>\n<p>All media files (for example, images for products, categories, the WYSIWYG editor, and so on) should be copied manually from \/media to \/pub\/media.<br \/>\nHowever, do not copy .htaccess files located in the Magento 1 media folder.<br \/>\nMagento 2 has its own .htaccess that should be preserved.<\/p>\n<p><strong>Storefront Design<\/strong><\/p>\n<ul>\n<li>Design in files (css, js, templates, XML layouts) changed its location and format<\/li>\n<li>Layout Updates stored in database. Placed through Magento 1 Admin in CMS Pages, CMS Widgets, Category Pages and Product Pages<\/li>\n<\/ul>\n<p><strong>ACLs (Access Control Lists)<\/strong><\/p>\n<ul>\n<li>You must manually re-create all credentials for web services APIs (that is, SOAP, XML-RPC, and REST)<\/li>\n<li>You must manually re-create all administrative users and associate them with access privileges<\/li>\n<\/ul>\n<p><strong>After Migration<\/strong><br \/>\nStart Magento 2 CRON jobs<br \/>\nFlush all Magento 2 cache types<\/p>\n<ul>\n<li>magento cache:status<\/li>\n<li>magento cache:enable [type] &#8230; [type]<\/li>\n<li>magento cache:disable [type] &#8230; [type]<\/li>\n<li>magento cache:disable db_ddl full_page<\/li>\n<li>magento cache:clean [type] &#8230; [type]<\/li>\n<li>magento cache:flush [type] &#8230; [type]<\/li>\n<li>magento cache:flush &#8211;all<\/li>\n<\/ul>\n<p>Re-index all Magento 2 indexers<\/p>\n<ul>\n<li>magento indexer:info<\/li>\n<li>magento indexer:status [indexer]<\/li>\n<li>magento indexer:reindex [indexer]<\/li>\n<\/ul>\n<p>References.<br \/>\n<a href=\"http:\/\/devdocs.magento.com\/guides\/v2.0\/migration\/bk-migration-guide.html\" target=\"_blank\" rel=\"noopener\">http:\/\/devdocs.magento.com\/guides\/v2.0\/migration\/bk-migration-guide.html<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Data Migration tool officially released by Magento for Community editions. For Enterprise edition only Partners can get the data migration tool. There is few rules for successful migration. Don\u2019t make any changes in Magento 1 admin except order Management. Stop all cron jobs in Magento 1 Don\u2019t alter any code Don\u2019t make changes in Magento2 admin and storefront. Supported Versions Following version are supported for Migration Community Edition (CE) version&#8230;<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[5],"tags":[],"class_list":["post-54","post","type-post","status-publish","format-standard","hentry","category-magento"],"_links":{"self":[{"href":"https:\/\/www.sureshselvam.com\/index.php\/wp-json\/wp\/v2\/posts\/54","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.sureshselvam.com\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.sureshselvam.com\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.sureshselvam.com\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.sureshselvam.com\/index.php\/wp-json\/wp\/v2\/comments?post=54"}],"version-history":[{"count":5,"href":"https:\/\/www.sureshselvam.com\/index.php\/wp-json\/wp\/v2\/posts\/54\/revisions"}],"predecessor-version":[{"id":60,"href":"https:\/\/www.sureshselvam.com\/index.php\/wp-json\/wp\/v2\/posts\/54\/revisions\/60"}],"wp:attachment":[{"href":"https:\/\/www.sureshselvam.com\/index.php\/wp-json\/wp\/v2\/media?parent=54"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.sureshselvam.com\/index.php\/wp-json\/wp\/v2\/categories?post=54"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.sureshselvam.com\/index.php\/wp-json\/wp\/v2\/tags?post=54"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}