Ce diaporama a bien été signalé.
Nous utilisons votre profil LinkedIn et vos données d’activité pour vous proposer des publicités personnalisées et pertinentes. Vous pouvez changer vos préférences de publicités à tout moment.

The Ultimate Guide on Magento 1 to Magento 2 Data Migration

130 vues

Publié le

We want to share with you how to migrate your store data from Magento 1 to Magento 2 using Magento 2 data migration tool. You’ll also find out how you can manage themes, extensions, and customization.

Publié dans : Technologie
  • Soyez le premier à commenter

  • Soyez le premier à aimer ceci

The Ultimate Guide on Magento 1 to Magento 2 Data Migration

  1. 1. The Ultimate Guide on Magento 1 to Magento 2 Data Migration WEB4PRO.NET
  2. 2. Introduction Magento 1 stops official updates in November 2018. According to BuiltWith, the number of live websites using Magento 2 grew up to 34000 at the moment (December 2018). There were 13500 live websites in July 2017. As you can see, Magento 2 becomes more and more popular, while the first version still exists. If you’ve decided to move to Magento 2, there is a complete guide on how to do this.
  3. 3. While migrating your website from Magento 1 to Magento 2, you’ll work with four components: - data; - themes, - extensions and custom code; - customization.
  4. 4. Magento 2 Migration Components Data Magento 2 Data Migration Tool is a ready-made assistant for migrating the web- site data. We can move all our customers, products, store configurations, order and promotions data to Magento 2 with its help. Themes and Customization We’ll need to make changes to themes and customizations for Magento 2. The system’s hierarchy is entirely different from Magento 1. Extensions and Custom Code We can go to Magento Marketplace and get new Magento 2 extensions with their latest versions or develop a new custom solution. To migrate the custom code, use Code Migration Toolkit presented by Magento on Github.
  5. 5. Preconditions -Check system requirements. Check parameter in php.ini memory_limit: more than 512M - Install Data Migration Tool. Versions of Magento and Data Migration Tool must match.
  6. 6. How to Install Data Migration Tool 1. Edit composer.json in Magento root directory. This way you provide the location of the Data Migration Tool package: “url”: “https://repo.magento.com/“. 2. Add to require “magento/data-migration-tool”: “version”, where “version” must match the Magento 2 code base version. 3. Create Magento 2 database backup. This will allow you to restore the initial database state if migration is not successful. 4. Check the network access to connect Magento 1 and Magento 2 databases.
  7. 7. 5. Copy Magento 1.x media files to Magento 2.x. You need to copy them manually from magento1-root/media to magento2-root/pub/media directory. 6. Stop all Magento 1.x cron operations. 7. Stop making any changes in Magento 1.x Admin except for order management and in Magento 2 Admin and storefront. 8. Remove outdated and redundant data from Magento 1.x database (logs, order quotes, recently viewed or compared products, visitors, event-specific categories, promotional rules, etc.).
  8. 8. Configuring Migration to Magento 2 Enable performing custom database mapping between Magento 1 and Magento 2 databases. Mapping and configuration files are located in the following directory: Create a config.xml from the provided sample config.xml.dist
  9. 9. Specify the access to the databases in config.xml: The <crypt_key> tag must be filled in. You can find it in local.xml file. The file is located in Magento 1 instance directory at app/etc/local.xml in <key> tag.
  10. 10. Migration Modes Migration from Magento 1 to Magento 2 consists of three modes: Settings: migrates configuration settings. Data: bulk migrates main data to the database. Delta: transfers incremental data updates added to Magento 1 storefront and Ad- min Panel while running previous migration modes.
  11. 11. Migrating Data to Magento 2 1. Disable/remove the step in config.xml: 2. Remove this one from delta mode: 3. Remove “delta_log” group in deltalog.xml.dist file:
  12. 12. Migrating Settings and Data to Magento 2 1. To start migrating settings, run: Where: • [-r|–reset] is an optional argument that starts the migration from the beginning • {<path to config.xml>} is the absolute file system path to config.xml • [ -vvv] is an argument used for outputting more verbose messages in the console 2. To start migrating data, run: 3. To start migrating incremental changes, run:
  13. 13. Top Common Errors of Migration to Magento 2
  14. 14. Error: ‘Foreign key (<KEY_NAME>) constraint fails. Orphan records id:<id> from <child_table>.<field_id> has no referenced records in <parent_table>’ When: We can get this error during Data Integrity Step. There are missing data- base records in the parent_table. The field_id of the child_table is pointing to this parent_table. Solution: Disable Data Integrity Step in config.xml:
  15. 15. Error: ‘Source documents are not mapped: <EXTENSION_TABLE>’ When: If some Magento 1 entities (in most cases, coming from extensions) do not exist in Magento 2 database. Solution: Install the corresponding Magento 2 extensions or ignore the problemat- ic data in map.xml (or map.xml.dist):
  16. 16. Error: ‘Source fields are not mapped. Document: <EXTENSION_TABLE>. Fields: <EXTENSION_FIELD>’ Solution:
  17. 17. Error: ‘Destination documents are not mapped: <EXTENSION_TABLE>’ Solution:
  18. 18. Error: ‘MySQL server has gone away’ Solution: Increase the following value in the /etc/mysql/my.cnfmysql configuration file: • max_allowed_packet = 2000M • wait_timeout = 6000
  19. 19. That’s it. We did it! How are you? If some issues arose over the process, we’d gladly help you to sort them out. To find this complete guide in details, visit our WEB4PRO blog and read the article: Migration from Magento 1 to Magento 2 Using Magento 2 Data Migration Tool
  20. 20. Thank You! We are happy to be useful for you. WEB4PRO Team WEB4PRO.NET