Magento 1 to Magento 2: How to Migrate Without Damaging Your Site
by Ron Dod
Home | Blog | Magento 1 to Magento 2: How to Migrate Without Damaging Your Site
Share this article
2020 is finally here. The end of Magento 1.0 rapidly approaches. With just under six months left before the company cuts the support lines, those who have still not initiated their Magento migration are well behind the curve.
Come June of this year, Magento will officially discontinue support for Magento 1.x, meaning software and security updates will no longer be provided. This leaves any retailer still using the software highly vulnerable. This is particularly true as the number of Magecart attacks continues to increase, becoming such a massive issue that the FBI has issued a warning “targeted to small and medium-sized businesses and government agencies that take credit card payments online.”
Understanding the severity of this problem, it is vital that retailers get started with their Magento migration immediately by hiring a certified Magento developer and implementing the following strategy for re-platforming an eCommerce store.
Next, it is critical that retailers create a full backup of their Magento 1 store, along with all the necessary files, folders and databases. This can be accomplished by:
Logging into the Magento Admin panel
Navigating to System > Tools > Backups
Clicking “Create Database Backup”
Additionally, sellers should not use the live store for the Magento migration process. Instead, transfer the data from the cloned database.
After completing these steps, verify if the site’s current extensions, themes and custom code are compatible with the Magento 2 software. Do be aware that the differences in the platforms make it impossible to migrate a Magento 1 theme to Magento 2 directly. Therefore, merchants will have to:
Finally, site owners will need to work with their development team to establish the best time to conduct the migration. Usually, this will be when the site receives the lowest amount of traffic. Planning the transition for the optimal time can help to avoid one of the most common website migration issues.
Fundamental Magento Migration Elements
Conducting a Magento migration, while a delicate and sometimes complicated task, can be broken down into three major areas:
Utilizing the Magento 2 Data Migration Tool, retailers can easily transfer data without dropping packets. That said, it is crucial to remember that this is a lengthy process for which sellers should employ a skilled developer to manage, as there are a variety of steps that must be followed.
Some of the critical components that must be migrated over include store configurations, order data, customer data and product information.
Thankfully, the platform’s community members have updated many of the Magento 1 extensions.
While some of the existing extensions that a store has in place may not be able to be used after the Magento migration, there are a plethora of amazing free and paid Magento extensions that can be employed.
Themes and Customizations
As was mentioned earlier, retailers cannot merely migrate their existing theme over to Magento 2.
However, Magento 2 has implemented a variety of performance updates over its predecessor that makes having to deploy a new theme worth the added effort.
Between a better eCommerce checkout flow, more exceptional performance and scalability and other enhancements, losing a current theme to a newer one offers sellers a variety of benefits.
With the basic structure laid out, let’s go ahead and explore how to conduct a Magento migration.
Magento Migration: Moving from Magento 1 to 2
To move a store over to Magento 2 and avoid common eCommerce migration issues, it is critical for sellers to plan the move thoroughly. What follows is a detailed framework for merchants to adhere to when conducting a Magento migration.
Again, managing the process one’s self is no easy task and is wrought with potential pitfalls. For this reason, it is highly advisable that retailers partner with an expert web development team to ensure the job is carried out accordingly to preserve (and potentially enhance) a site’s performance standards.
To successfully migrate from Magento 1 to Magento 2:
Afterward, extract the downloaded data and follow the setup wizard tutorial to install the platform. From here, sellers are in possession of the Magento 2 platform with an empty database. This is where the existing store’s data will be migrated.
Download the Migration Tool
Access the command line of the root folder in Magento 2 and download the data migration tool in the newly minted version of Magento 2 with the following command:
composer require Magento/data-migration-tool
However, do be aware that the version of the migration tool must correlate to that of the Magento 2 codebase. This information can be found through the composer.json file.
For instance, if retailers download Magento version 2.3.3 (which is the most current as of this writing), then the command would appear:
Enter the appropriate directory for the migration and then enter the directory with the Magento 1 version name.
Retailers will also want to create a copy of the file map.xml.dist and rename it to map.xml in the new folder. Next, make a copy of the file config.xml.dist and rename it to config.xml in the appropriate folder.
Open the file to make the following alterations:
Under <source>, enter the Magento 1 database details.
Under <destination>, enter the Magento 2 database information.
<crypt_key> is the encryption key for the Magento 1 store, which can be found in the Magento 1 directory at app/etc/local.xml within the <key> tag.
Database mapping between the two platforms is done through mapping files, located in /vendor/Magento/data-migration-tool/etc/.
To utilize these mappings, it is necessary to remove the .dist extension.
After removing, alter the file names (by deleting .dist) in the config.xml file under the “options” tab.
After completing these tasks, save the config.xml.
Before initiating the Magento migration, retailers must handle a few necessary tasks.
Firstly, sellers must halt all current activities (except order management tasks) in Magento 1 via the Admin Panel. Additionally, stop all cron jobs running on the current platform and place the site in maintenance mode.
The reason for this is to stop all activities that might alter the database, thereby creating a discrepancy after the migration is complete.
Next, open firewall ports to enable the migration tool to communicate with the databases, and to allow the Magento 1 and 2 databases to talk to one another.
Now, migrate the theme to the Magento 2 theme structure (if applicable) and migrate all the necessary extensions and customizations from version 1 to version 2.
Migrate the Store
At this point, merchants are ready to migrate the eCommerce store and system configurations such as tax settings, payment gateways and the like. To do this, it is necessary to run the following command:
php bin/magento migrate:settings –reset <path to your config.xml>
Assuming that sellers are simply transferring an Open Source site to Magento 2 Open Source, the <path to your config.xml> would be vendor/magento/data-migration-tool/etc/opensource-to-opensource/<Magento 1.x version>/config.xml.
After the process is finished, retailers will see the “migration complete” status.
Next, it is time to move over data pertaining to products, categories, ratings, customers, orders and similar information. To migrate this data, run the following command:
php bin/magento migrate:data –reset <path to your config.xml>
As the command runs, the migration tool will save progress as it advances. This way, in the event of an error, retailers can stop the process, back up to the last known state of exactitude and begin again.
After the migration has finished, sellers will once again see the “migration complete” status.
With Magento 1 support ending in June 2020, the clock is ticking for retailers to complete their migration to Magento 2. Those who fail to make the switch beforehand put their company–and its customers–in a highly vulnerable position.
Given that the Magento migration is an inevitability for the platform’s users, sellers who have yet to make the move should do so immediately. Not only will it help to prevent potential compromises from cybercriminals, but Magento 2 touts a variety of benefits over the previous iteration of the platform.
However, we understand that migrating an eCommerce store is a technical, complex and delicate process that poses a variety of dangers for online retailers. By reaching out to Visiture’s team of Magento web development experts, merchants can breathe easy knowing that their store migration is being handled by some of the most capable certified developers the industry has to offer.
Ronald Dod is the Chief Marketing Officer and Co-founder of Visiture, an end-to-end eCommerce marketing agency focused on helping online merchants acquire more customers through the use of search engines, social media platforms, marketplaces, and their online storefronts. His passion is helping leading brands use data to make more effective decisions in order to drive new traffic and conversions.
Receive a Free eCommerce Marketing Audit Today!
8 Tips to Improve Your Mobile Speed Score
January 19, 2021
The eCommerce Growth Series – PWAs and Predictions: Embracing the Future of eCommerce with BigCommerce