Steps to follow before migrating Magento 1 to Magento 2!

By: Skynet Technologies USA LLC
8 mins
500
Migrating Magento 1 to Magento 2

Magento 2 was released back in 2015 and ever since makers are publishing warnings about Magento 1 End of life. Though several ecommerce stores are still running on Magneto 1. However, Magento 2 is the evolved version of Magento 1 with umpteen modern features and functionalities; many stores' owners fear migrating their store to Magento 2.

Magento 2 has an altogether new architecture, coding structure, and database design. Moreover, since the support for Magento 1 withdrawal, Magento 2 got the best development to remain ahead of its competition.

Migrating Magento 1 to Magento 2 without precaution can lead to business losses. In this article, we have described pre-migration checklist and the best way of Magento 2 migration.

Checklist to follow before Magento 2 migration

  • Take a complete backup of the Magento 1 store including all files, folders, and database.
  • Creating a clone of the Magento 1 store for the migration process is a safe and intelligent move.
  • Audit and analyse the store and keep only necessary data, delete unwanted clutter of files and folders. Remove outdated and useless data from the database.
  • Find out if your current themes and extensions are compatible with Magento 2 or not.
  • When you start the migration, migrate data from the cloned Magento 1 store.
  • Prepare the same hosting server for the new Magento 2 store on which you had Magento 1 store running.
  • Please do not forget to give special attention to SEO for the sake of store traffic and ranking on the SERPs.

SEO Analysis – Pre-Migration Step

Before you migrate your Magento 1 store to Magento 2, take care of Magento store SEO because it is one factor that matters to bring traffic to your store. Thus, to avoid traffic loss, perform SEO analysis. Try to follow the below-mentioned steps before you plunge into Magento 1 to Magento 2 migration.

1. Google Analytics Scanning

This is one step you cannot miss. Go to your Google Analytics account and set a date range to find out the latest traffic trends on your store. You will find the URLs that are contributing maximum to bringing traffic to your store. Make sure you will not miss those pages to migrate from Magento 1 to Magento 2.

2. Google Search Console Analysis

After Google Analytics, analyse your Google Search Console data. Check all the high-performing keywords, their clicks, and impressions to make sure they can be as yielding after migration as well. Moreover, do not forget to check whether your website is returning any 404 errors. If there is any, fix it before migration.

3. Scrutinize the Robots.txt File

This is equally a crucial step. Check if you are not blocking the .js file or any media file. If these critical files are blocked, unblock them. You can access your robots.txt file by typing “/robots.txt” in front of your homepage URL.

Then scan the Sitemap.xml file to check the structure of your website. Also, make sure you have correctly set canonical tags for static pages of the website. Canonical tags help in case of duplicate content. If you wish to check for any specific page, do that by using <link rel="canonical" href="www.example.com">.

And please remember, to avoid changing meta tags, especially meta descriptions, meta titles, and H1 while migrating from Magento 1 to Magento 2. It may influence website SEO. Find out more details from website migration SEO checklist.

Migrating From Magento 1 to Magento 2

Migration happens in four stages – Theme migration, extension migration, customization, and data migration.

1. Theme Migration

Since Magento 2 has ample new methodologies to cater to modern market needs, developers can leverage this fact for creating incredible Magento 2 themes or modifying the current ones as per Magento 2 standards. Please note that you cannot directly migrate a Magento 1 theme to Magento 2. Make it responsive and compatible with Magento 2 and then migrate it.

2. Extension Migration

Extensions are much needed to increase the store’s functionalities. You can choose as many Magento 2 extensions available in the Magento marketplace. Please remember, that Magento 1 extensions will not work for Magento 2; there are severe compatibility issues.

3. Customization

Many a time, Magento 1 custom codes are compatible with Magento 2 as well. You have a Magento Code Migration Toolkit to ensure a smooth code migration process. As you know, there are huge structural differences between the two versions, migration may need additional work to successfully migrate custom code.

4. Data Migration

Last but not least, move your Magento 1 settings and data to Magento 2. To simplify this process, Magento has provided Data Migration Tool, which helps developers to migrate the data and settings using CLI commands. This tool migrates the complete database of the Magento 1 store to Magento 2.

Now let us unearth how to migrate data using Data Migration Toolkit.

Install Magento 2 Data Migration Tool via Composer

Use composer to install Data Migration Tool into your new Magento 2 store. And before you install the tool, move all the media files from Magento 1 to Magento 2 by using the following command.

rsync -a magento-sample-data 1.9.1.0 /media/ {username}@{publicIP}:{Media Folder Path}

Moreover, remember that you are using the same version of the Data Migration Tool as Magento. For instance, if you are using Magento 2.2.0, then the Data Migration Tool version must be 2.2.0. Once you install the Data Migration Tool, update the location of the tool package in the composer.json file to make it work.

composer require magento/data-migration-tool:<version>

In the above CLI command, version refers to the version of the Data Migration Tool. After installation is done, you need to configure the Data Migration Tool.

There are directories, that contain mapping and configuration files for the Data Migration Tool.

<Magento 2 root dir>/vendor/magento/data-migration-tool/etc/opensource-to-opensource  
<Magento 2 root dir>/vendor/magento/data-migration-tool/etc/opensource-to-commerce
<Magento 2 root dir>/vendor/magento/data-migration-tool/etc/commerce-to-commerce

All the above files will contain configuration and scripts for migrating from Magento 1 to Magento 2 open source to open source, open source to commerce, and commerce to commerce, respectively.

Before you migrate the data, ensure that you have created a config.xml file in the relevant directory. Then open config.xml in the code editor and do the following:

<source>
  <database host="localhost" name="Magento1-DB-name" user="DB-username" password="DB-password"/>
</source>
<destination>
  <database host="localhost" name="Magento2-DB-name" user="DB-username" password="DB-password"/>
</destination>
<options>
  <crypt_key>Magento1-Encrypted-Key</crypt_key>
</options>

In the above code, the ‘source’ is Magento 1 information, and the ‘destination’ is Magento 2 information.

And then to migrate data run the following CLI command:

php bin/magento migrate:data --reset --auto <path to your config.xml>

Once the data migration is done, you will receive the success message. Similarly, migrate settings using the below command:

php bin/magento migrate:settings --reset <path to your config.xml>

This is how you migrate the entire Magento 1 store to Magento 2 using composer.

Wrapping Up

If you are performing in-house migration, then make sure to review the Magento 2 store after migration. It will help you to know whether the new store is functioning properly or not and if there is any issue, you can fix it.

The Magento 1 to Magento 2 migration is not easier, it is not complicated as well. Reach out to some Magento migration company who can help you with migrating the store seamlessly.

At Skynet Technologies, we have years of proven experience and expertise in Magento ecommerce development. With the right transition plan and professional developers, we facilitate a seamless migration from any platform to the latest and secured version of Magento 2.x. Get in touch with us or fill out the following form to know more about Magento migration.

271