©  Viktor Khliupko 2017

Viktor Khliupko, Magento 2 DIY , 10.1007/978-1-4842-2460-1_12

12. Migration

Viktor Khliupko

(1)Duesseldorf, Germany

After the launch of Magento 2, it is vital to understand how to migrate from Magento 1 to Magento 2. Since the migration is a complex process with lots of all possible aspects, you should know what to do with themes, extensions, data, and custom features. In this chapter, we’ve gathered all information about Magento 2 migration1. Below you will find useful migration tips as well as reliable Magento 2 migration tools.

Magento 2 Migration: Requirements

Migration elapse time is among key requirements. While critical for big projects, it is less important for small sites. For a big web site, migration could take from several hours to a few days.

Keep in mind that it shouldn’t be necessary to take the site offline for too long. The problem is in performing a full bulk copy of the database. That takes too long. A variation of the catch-up phase is also required. This phase occurs after the main bulk copy and requires the offline phase.

It is important to place restrictions on operations that should not be performed during the migration. For instance, it is possible to place orders, but all the changes done by administrators are prohibited. It is also expected that developers are going to provide migration support for their extensions. There are two possible approaches to data migration for extensions. First of all, developers can provide the necessary documentation with the detailed tutorials about migration. There is also a possibility of a more flexible and pluggable framework that can automate the migration.

Magento 2 Migration: Current conditions

Both an export of database contents and an import into Magento 2 are too slow. The current design relies on a direct database-to-database data transfer.

A configuration file specifies which content should be copied from Magento 1 to the Magento 2 database. The official support went only to the recent Magento 1 releases. Earlier versions require the appropriate adjustment of the configuration file.

Besides simple table copies, PHP code is also able to be plugged into the process. It is required to perform more complicated data migration.

To capture changes to selected tables during the bulk copy, database triggers are used. All these changes are saved in a table for later use. To reduce the number of triggers, you should limit the administrator actions.

The migration tool also works with product images. Sites that do not rely on the default image storage may require some additional actions.

Magento 2 Migration: The migration procedure

  1. Create database triggers, which are necessary to capture increment changes.

  2. Run the data bulk copy.

  3. Stop all changes and make the old site offline.

  4. Perform catch-up changes.

  5. Delete all triggers from the old database.

  6. Turn the new Magento 2 site online.

Magento 2 Migration: More tips on migration to Magento 2

Hit the link and you will find a tutorial explaining Magento 2 migration. The material offers a lot of useful tips developed to help you with the migration to Magento 2.

Magento 2 Migration Tools

Below, you will find the most robust tools designed to make Magento 2 migration seamless. There are both official and third-party software solutions described in this section.

Code Migration Toolkit

A new tool that simplifies migration to Magento 2 has been developed. As members of the Magento community, we’ve been waiting for a new migration instrument aimed at modules since the first announcement of Magento 2, and finally we’ve got it. Dubbed the Magento Code Migration Toolkit, the software solution will essentially change the way you used to work with custom Magento extensions while trying to port them from 1.X to 2.0.

With the Magento Code Migration Toolkit, you get scripts that streamline the conversion of custom 1.x modules to Magento 2 by automating time-consuming processes. The software solution automatically converts such important things as module directory structure as well as PHP, config.xml, and layout.xml files.

Please note that the Magento Code Migration Toolkit requires some manual operations to be performed. For instance, conversion scripts must be run in the specified order. Besides, it is necessary to edit some files in the installation manually.

As for prerequisites, they are the following:

  • PHP 5.5.x+

  • cthe omposer package management software

  • designated source, which is Magento 1.x

  • target directories of Magento 2

The installation procedure and module migration process are described on the Magento Code Migration Toolkit page on GitHub.

Get Magento Code Migration Toolkit

Official Magento CE Data Migration Tool

Painless migration from Magento 1.x to Magento 2 is possible with Magento CE Data Migration Tool. Currently, the extension supports the following components: data, themes, extensions, customizations.

Magento 2 Data Migration Tool provides the ability to move store configurations, promotions, customers, products, and order data from Magento 1.x to Magento 2.

Please note that code is not ported due to its inability to be automated.

Still, there is no certain information about porting extensions. Check GitHub for the additional data. Developers are working hard with the community to provide the ability to port Magento Modules.

Magento 2 relies on an innovative approach to themes and customization. Thus, merchants and developers will need to change the existing products in order to get all the abilities of new shopping experiences. Don’t forget to check official documentations for: themes, layouts, and customizations.

Magento CE Data Migration Tool works with Community Edition 1.9.1.0. Support for CE 1.6.x, CE 1.7.x, CE 1.8.x, CE 1.9.x is expected.

Prerequisites

It’s important to comply with the requirements:

  • Set up your Magento 2.0 in order to these system requirements2.

  • Set up the topology and design of a new system with your existing Magento 1.x system in mind.

  • Please note that it is prohibited to start Magento 2.0 cron jobs.

  • Back up your Magento 2 database after installation. Do it as soon as possible. You can also dump it.

  • Magento CE Data Migration Tool should have a network connection to the databases of both Magento 1.x and Magento 2.

  • The ports in your firewall should be opened. Provide your databases and the migration tool with the ability to communicate with each other.

  • You can replicate your Magento 1.x database in order to provide redundancy in the event of unexpected issues.

  • Migrate the existing 1.x custom code and extension to Magento 2.0.

  • Ask providers of your extension if you’ve ported them successfully.

Download Magento CE Data Migration Tool

Testing Magento 2 Data Migration Tool

There is a good post about Magento 2 Data Migration Tool on Inchoo. The author describes current opportunities and limitations introduced in the tool. Unfortunately, the solution for data migration to Magento 2 is far from perfect. It still does not provide support for themes and customizations, for instance. Therefore, get ready for tons of manual work while migrating to Magento 2. Firebear members believe that one day this process will be seamless, but not today. You can read more about Testing Magento 2 Data Migration Tool here.

Magento 2 DB Migration

This script is designed to migrate database from Magento 1.8 or 1.9 to Magento 2 beta5. Keep in mind that this tool comes with no warranty. In addition, this module should be adapted for each new version of Magento 2.

Pay attention to the fact that Magento 2 provides a lot of changes to the code. As a result, more internal refactoring will be necessary in the future.

Magento 2 DB Migration on GitHub

Magento 2 Data Migration Tool by Ubertheme

This is another solution, designed to help you with migration to Magento 2. The process is described at GitHub. You can also find all the necessary requirements there.

Magento 2 Data Migration Tool on GitHub

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
3.147.104.120