In Magento 2 Development Cookbook by Bart Delvaux, the overarching goal of this book is to provides you with the with a wide range of techniques to modify and extend the functionality of your online store. It contains easy-to-understand recipes starting with the basics and moving on to cover advanced topics. Many recipes work with code examples that can be downloaded from the book’s website.
(For more resources related to this topic, see here.)
Solve common problems encountered while extending your Magento 2 store to fit your business needs. Exciting and enhanced features of Magento 2 such as customizing security permissions, intelligent filtered search options, easy third-party integration, among others. Learn to build and maintain a Magento 2 shop via a visual-based page editor and customize the look and feel using Magento 2 offerings on the go.
This article covers Preparing an upgrade from Magento 1.
The differences between Magento 1 and Magento 2 are big. The code has a whole new structure with a lot of improvements but there is one big disadvantage. What to do if I want to upgrade my Magento 1 shop to a Magento 2 shop.
Magento created an upgrade tool that migrates the data of the Magento 1 database to the right structure for a Magento 2 database.
The custom modules in your Magento 1 shop will not work in a Magento 2. It is possible that some of your modules will have a Magento 2 version and depending of the module, the module author will have a migration tool to migrate the data that is in the module.
Before we get started, make sure you have an empty (without sample data) Magento 2 installation with the same version as the Migration tool that is available at:
https://github.com/magento/data-migration-tool-ce
composer config repositories.data-migration-tool git https://github.com/magento/data-migration-tool-ce
composer require magento/data-migration-tool:dev-master
php vendor/magento/data-migration-tool/bin/migrate
This command will print the usage of the command.
cp –R vendor/magento/data-migration-tool/etc/ce-to-ce/1.9.1.0/ vendor/magento/data-migration-tool/etc/ce-to-ce/packt-migration
<source>
<database host="localhost" name="magento1" user="root"/>
</source>
<destination>
<database host="localhost" name="magento2_migration" user="root"/>
</destination>
mv vendor/magento/data-migration-tool/etc/ce-to-ce/packt-migration/config.xml.dist vendor/magento/data-migration-tool/etc/ce-to-ce/packt-migration/config.xml
By adding a composer dependency, we installed the data migration tool for Magento 2 in the codebase. This migration tool is a PHP command line script that will handle the migration steps from a Magento 1 shop.
In the etc folder of the migration module, there is an example configuration of an empty Magento 1.9 shop. If you want to migrate an existing Magento 1 shop, you have to customize these configuration files so it matches your preferred state.
In the next recipe, we will learn how we can use the script to start the migration.
This book is packed with a wide range of techniques to modify and extend the functionality of your online store. It contains easy-to-understand recipes starting with the basics and moving on to cover advanced topics. Many recipes work with code examples that can be downloaded from the book’s website.
In this article, we learned about how to Prepare an upgrade from Magento 1. Read Magento 2 Development Cookbook to gain detailed knowledge of Magento 2 workflows, explore use cases for advanced features, craft well thought out orchestrations, troubleshoot unexpected behavior, and extend Magento 2 through customizations.
Other related titles are:
Magento : Beginner's Guide - Second Edition
Mastering Magento Theme Design
Further resources on this subject: