This website uses cookies

Our website, platform and/or any sub domains use cookies to understand how you use our services, and to improve both your experience and our marketing relevance.

How To Migrate From Magento 1 To Magento 2 Without Breaking Anything On Your Store

Published on April 27, 2020 - Content Updated on December 24, 2021

12 Min Read
Magento 2 Migration

Magento 2, the transformed version of the Magento Ecommerce Platform, comes with a brand new architecture, coding structure, and database design. The support for Magento 1 will end soon. Already the best minds in the ecommerce development industry are focused on making Magento 2 a successful ecommerce platform. In this context, the most important question is how to conduct Magento migration.

Want to migrate from Magento 1 to 2?

Let a Cloudways Expert help you migrate your Magento store with ease.

This is what Ben Marks, Evangelist at Magento, tweeted about the sunset of Magento 1:

Paul Boisvert, head of Product Management at Magento, also verified the information and said that November 18th, 2018 is the exact date when the world will bid Magento 1 an official goodbye with three years of Magento 1 End-of-Life (EOL) warning to store owners. But later this was said by Magento Inc. that right now they have no plan to discontinue the support for Magento 1.

Given all this, it is essential that store owners should start planning of Magento migration from M1 to M2 as soon as possible. If you are planning on moving over to Magento 2, continue reading this blog post because today, I am going to give you a detailed overview of the Magento migration process.

Test, Develop, Deploy Magento without Interrupting the Users

Get FREE staging environment with managed cloud hosting. Unlimited staging URLs to test and develop without changing the live website.

Before starting the actual migration process, consider the following recommendations:

  • Make a full backup of the Magento 1 store including all files, folders, and the database.
  • Create a clone of your Magento 1 store. Do not use the live store for the Magento migration process.
  • Analyze your store. Keep what you think is necessary and delete the rest for Magento 2 migration.
  • Check whether your current theme(s), extensions and custom code are compatible with the Magento 2.
  • Migrate the data from the cloned database of your Magento 1 store.
  • Remove outdated and useless data from the database including logs, recently viewed products, compared products, etc.
  • Install a fresh copy of Magento 2 on the same hosting server where your Magento 1 store is located.
  • You should also ensure that the store traffic and other SEO related practices are streamlined.

    To check’em out, let’s have a look at these quick pro tips.

SEO Analysis That You Should Keep in Mind Before M1 To M2 Migration

The first issue that arises for the store owner is they worry about losing the traffic which ultimately leads to the loss of conversion. To counter this issue they should perform an SEO analysis before M1 to M2 migration.

Here’s some necessary technical SEO analysis that you need to go through before getting into the Magento 2 migration processes.

Analyze Your Google Analytics

The first thing that you need to do is to analyze your Google Analytics. To do that you need to go to your google analytics. Set the date range of at least the last 6 months. You can find the date range section in the top right corner of your Google Analytics screen.

Analyze Google Analytics

The next thing that you need to do is to view your data as a landing page. To do that go to the panel on the right and select Behaviour > Site Content > Landing Page.

Landing Page Navigation

Here, you need to record the URLs that are heavily contributing to your website traffic. So, in this way you can ensure that the most critical pages of the Magento 1 website are migrated to the Magento 2 website properly.

Analyze Your Google Search Console

The second thing that you need to do is to analyze your Google Search Console Data. 

  • Check Your High Performing Keywords

In order to check your keyword, simply go to your GSC account and Click to Performance > Search Results.

Google Search Console Queries

As shown in the above, you can find the keywords, their impressions, and clicks. By this, you can analyze your best-performing keywords remain stagnant once your store gets migrated from Magento 1 to Magento 2. 

  • Fix The 404 Errors

To view your 404 error file you need to navigate to the index> coverage section in Google Search Console. Check if your website is returning any 404 errors and make sure to fix them before the migration process.

Google Search Console Coverage

  • Analyze Your Robots.txt File

You can Analyze your robots.txt file to see if you are not blocking the .js file or any media files. If you are, make sure to unblock them. You can access your robots.txt file by simply typing “/robots.txt” in front of your home page URL.

Ensure that you aren’t blocking any .JS or any media files. All you have to do is access your robots.txt file by simply typing “/robots.txt” in front of your home page.

  • Analyze Sitemap.xml File

Access your sitemap.xml file by simply typing “/sitemap.xml” right after your home page URL. And make sure that your sitemap.xml is updated and has all the structure of your website.

  • Analyze Your Canonical Tags

Make sure that you have properly set canonical tags for all the static pages of your website. Canonical tags make sure that you are passing the link juice to the right pages in case of duplicate pages. If you want to check for the canonical tag of any particular page, just access their view page source and look <link rel=”canonical” href=”www.example.com”/> if you are able to find the tag thus means the canonical tag is available.

  • Don’t Change Your Meta Tags

Do not change your Meta Tags, especially MTs, MDs, and H1 in the migration process from Magento 1 to Magento 2 as they could leave an impact on your SERP results.

Why Is Magento 2 Better than Magento 1?

Magento supports all new stack including the latest PHP 7.4, Apache 2.4, NGINX 1.x, Elasticsearch 7.9.x. RabbitMQ 3.8.x, Varnish 6.x, etc. All together improves the speed and performance of the website. Ultimately, that helps in taking more orders and loads the frontend content faster than Magento 1. 

As far as Magento 2 extensions are concerned, they are more reliable and have more clean code. With Magento 2.x, you can experience a significant impact in SEO with schema.org and the rich snippets on the catalog pages. More importantly, Magento 2 is more mobile-friendly as compared with Magento 1. The themes are more responsive, and the checkout process is also optimized, plus Magento 2 supports PWA that allows developing a mobile native application experience for the online store.

Magento 2 Migration Processes

According to the official documentation, Magento 2 migration consists of four different stages:

  1. Theme Migration
  2. Extension Migration
  3. Customizations
  4. Data Migration

Theme Migration

Magento 2 introduces new methodologies and technologies for delivering enhanced shopping and store experience to the merchants and users. Developers can take advantages of new ways of creating awesome Magento 2 themes or modify the current ones to make them compatible with the Magento 2 standards. You should keep in mind that you cannot directly migrate your Magento 1 theme to Magento 2.

You have to create a new theme for Magento 2 and make it responsive for the best user experience. To help you with this, I have written an easy-to-follow article on how to create a custom theme in Magento 2.

If you wish to avoid all this hassle, buy and install a Magento 2 theme from the Magento Marketplace or other reputed sources.

Extension Migration

Extensions are essential components that provide new features and extend the functionalities of your Magento store. The next step in Magento migration process is to install the desired Magento 2 extensions available on Magento Marketplace.

Remember that, Magento 1 extensions will not work on Magento 2. You will experience severe compatibility issues while integrating Magento 1 extensions into Magento 2.

Only install the relevant extensions that are available and required for your Magento 2 stores. The Magento developers, community and development agencies are still working hard on porting Magento 1 extensions to Magento 2.

If you want to do it on your own, and want to learn more about Magento 2 extension development, please have a look at my how to create Magento 2 extension blog post.

Customization

In many cases, the custom code used by your Magento 1 store is compatible with Magento 2. Magento offers a Code Migration Toolkit that helps you in this process. It should be noted here that due to structural differences in the two platforms, This Magento migration may require additional work to make sure that the custom code successfully integrates with the Magento 2 store.

To know more about the integration, visit the GitHub repository of the Magento Code Migration Toolkit.

Data Migration

The last action you need to perform during Magento migration process is moving your Magento 1 settings and data to Magento 2. To ease up the Magento migration process, Magento has officially released Magento 2 Data Migration Tool that helps developers migrate their store data and settings using CLI commands. It makes the Magento migration process hassle-free and helps in migrating critical data (products, categories, orders, store configurations & settings, etc.) to Magento 2.

Why Cloudways Is The Right Hosting Partner?

Know the reason why over 40,000 digital agencies, developers, designers and marketers are using Cloudways.

Data Migration Tool migrates the entire data from the database of Magento 1 platform to the database of Magento 2 platform based on a set of rules defined in the XML files. As of now, the Data Migration Tool only transfers data and settings. Extensions, themes, and other code customizations of Magento 1 store cannot be automatically migrated to Magento 2 store. You will have to reach out to your theme/extension provider to see if they have provided an exporting option yet for Magento 2 platform.

Install Magento 2 Data Migration Tool via Composer

You can install the Data Migration tool into a fresh Magento 2 store using Composer. Remember, it’s not a Magento 2 extension, it’s a standalone shell application that requires Magento 2 store to become operational.

To install the Data Migration Tool, make sure that the version of Magento 2 store and Data Migration Tool match.

For example, if you are using Magento version 2.2.0, you must install the Data Migration Tool version 2.2.0. In general, If you are using the latest version of Magento 2 platform, you have to use the most recent version of the Data Migration Tool as well.

To find the version of your store, navigate to the root directory of your Magento 2 via SSH and enter the following command:

php bin/magento --version

Now, once you know the version of your Magento 2 store, it’s the time to install the Magento 2 Data Migration Tool.

Keep in mind that you must update the location of the Data Migration Tool package in the composer.json file to make it work.

To do that, just run the following commands:

composer config repositories.magento composer https://repo.magento.com

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

In the above CLI command, <version> refers to the version of the Data Migration Tool that must match the Magento 2 version discovered earlier.

For example, if you are using Magento version 2.2.0, enter:

composer config repositories.magento composer https://repo.magento.com

composer require magento/data-migration-tool:2.2.0

You will be asked to enter your developer authentication keys. Go to the Magento Marketplace. Sign in using your login credentials, go to your profile and then click Access Keys under My Products section.

If you already have keys then, your public key will be your username and the private key will be your password. Otherwise, create a new key pair by clicking the Create a New Access Key button.

In a few seconds, the Data Migration Tool will be successfully installed on your Magento 2 store.

Optimize Magento Speed Like a Pro

Subscribe now and get a free ebook to your inbox.

Thank You

Your Ebook is on it’s Way to Your Inbox.

Configure Magento 2 Data Migration Tool

After the installation is finished, the following directories will contain mapping and configuration files for the Data Migration Tool.

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

The above file will contain configuration and scripts for migrating from Magento 1 Open Source platform to Magento 2 Open Source platform.

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

The above file will contain configuration and scripts for migrating from Magento 1 Open Source platform to Magento 2 Commerce.

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

The above file will contain configuration and scripts for Magento migration from M1 Commerce to M2 Commerce.

Before you migrate any settings and data, you must create a config.xml file in the relevant directory. For example, if you are performing data migration from Magento 1 Open Source platform to Magento 2 Open Source platform, navigate to the

<Magento 2 root dir>/vendor/magento/data-migration-tool/etc/opensource-to-opensource/<Magento 1.x version> directory and rename config.xml.dist to config.xml.

Next, open config.xml in your favorite code editor and specify 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, <source> has the database information of Magento 1 and <destination> has the relevant database information of Magento 2. <crypt_key> is mandatory and needs to be filled prior run. It is the encryption key of Magento 1 store and can be found in the <Magento 1 root dir>/app/etc/local.xml file, within the <key> tag.

When finished, save the config.xml and you are done.

Migrate Settings Using Magento 2 Data Migration Tool

Here is how you can use the Data Migration Tool to migrate settings from Magento 1 to Magento 2. These settings include stores, websites, system configurations such as shipping, payment, tax settings, etc.

According to the Magento Data Migration Order, you should migrate settings first. To start migrating the settings, navigate to your Magento 2 root directory via SSH terminal and run the following command:

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

where <path to your config.xml> this would be vendor/magento/data-migration-tool/etc/opensource-to-opensource/<Magento 1.x version>/config.xml. I have used –reset argument in the above command which forces the Data Migration Tool to start from the beginning.

Once the settings migration is over, a successful message will be displayed.

Migrate Data Using Magento 2 Data Migration Tool

Data migration from Magento 1 platform to Magento 2 platform includes products, categories, orders, customers, wish lists, ratings, etc. To migrate data, run the following CLI command:

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

As this command runs, the Magento 2 Data Migration Tool saves its current progress, and in the case of an error, stop the process and resume from the last known good state. Also, the Magento 2 Data Migration Tool may report some errors during the migration. In such a case, refer to the Troubleshooting page of the Magento 2 Data Migration Tool for further assistance.

Once the data migration is complete, you will receive a success message.

Upgrade Magento with the Automated Tool

Besides a manual upgrade via Composer, you can consider using an automated data migration tool to switch from Magento 1 to Magento 2.

Currently, LitExtension is the leading shopping cart migration expert that helps you automatically, accurately, and securely migrate all your valuable entities, including products, orders, customers, and even multiple languages, to your new store.

The price and estimated time of your migration will depend on the number of entities that have to be transferred, and the complexity of your project.

In this section, I will guide you through 3 simple steps to upgrade your Magento store with the LitExtension tool.

Let’s get started!

Before setting up your migration details, you need to register or log in to LitExtension if you already have an account. Also, you can sign in with your Google or Facebook account.

M1 to M2 Migration 1

Then you’ll be redirected to the My Migration page. Simply click on the Create New Migration button to start.

M1 to M2 Migration 2

Step 1: Provide Your Shopping Cart Information

At this step, select Magento as your Source Store and Target Store and provide your store URL. Then download the LitExtension connector, extract the zip file, and follow the instructions to upload it to your Source and Target store’s root folder. You can also watch the video tutorial for visualized guidance.

M1 to M2 Migration 3

At the end of the Setup page, hit Next to continue.

Step 2: Select Entities to be Transferred and Additional Options

You are able to select as many entities to migrate as you like. If you want to migrate everything from Magento 1 to Magento 2, check Select All.

M1 to M2 Migration 4

Don’t forget to take a look at the Additional Options that help you extend your migration possibility. Here LitExtension provides more than 10 options for you to choose from, including Preserve Product IDs on Target Store, Migrate Customers’ Passwords, and more.

M1 to M2 Migration 5

If you are new to LitExtension, I recommend that you perform a Free Demo Migration. By doing this, you can understand how LitExtension transfers and stores data in your new store. 20 entities will be migrated automatically without any extra cost.

Step 3: Run Full Migration

Now, it’s time to start the Full Migration process that upgrades your Magento 1 store to a better version.

M1 to M2 Migration 6

As the data switching process is cloud-based, it’s completely safe to turn off your browser window or your PC. Make yourself a cup of coffee as you wait for the notification from LitExtension to your email to inform you the process is over.

Remember to click on the Check result button to make sure that everything has been transferred to your new store flawlessly.

M1 to M2 Migration 7

In case you have any questions, don’t hesitate to contact the LitExtension support team. They are available 24/7 to solve your problems as quickly as possible.

Magento 2 Migration FAQs

Q. How long does it take to migrate from Magento 1 to Magento 2?

In general, a Magento migration project will take 1-3 months to complete.

Q. What is migration in Magento 2?

Magento 1 to Magento 2 migration is a migration service that covers the transfer of design, Magento extensions, database, and custom functionality from Magento 1 to Magento 2 platform requiring a certain level of technical skills.

Q. Why do I migrate to Magento 2?

It’s important to migrate your store from M1 to M2 due to many reasons. But the most important reason to consider is there would be no support available for Magento 1. If your M1 store gets vulnerable then there would be less possibility to recover it.

Final Thoughts

Once all Magento migration processes are successfully over, do not forget to test the Magento 2 store thoroughly to ensure that everything functions properly. Although I have outlined the entire migration process, it is not an easy task since it is not fully automated yet. You will have to do plenty of manual work to answer the question: how to do Magento 1 to Magento 2 migration.

For smooth and trouble-free Magento migration you can choose Cloudways Magento hosting, I would recommend store owners hire a Magento professional for the job. In case, you face a difficulty in understanding the migration process, leave your questions in the comments section.

Share your opinion in the comment section. COMMENT NOW

Share This Article

Customer Review at

“Great speed, features, knowledgebase, dashboard, UX and fast, expert support. Very happy!”

Stefan [Management Consultant]

Fayyaz Khattak

Fayyaz, a passionate Motorbike tourist, works as a Team Lead — Magento Community at Cloudways - A Managed Magento Hosting Platform. His objective is to learn & share about PHP & Magento Development in Community. You can contact him at [email protected]

×

Get Our Newsletter
Be the first to get the latest updates and tutorials.

Thankyou for Subscribing Us!

×

Webinar: How to Get 100% Scores on Core Web Vitals

Join Joe Williams & Aleksandar Savkovic on 29th of March, 2021.

Do you like what you read?

Get the Latest Updates

Share Your Feedback

Please insert Content

Thank you for your feedback!

Do you like what you read?

Get the Latest Updates

Share Your Feedback

Please insert Content

Thank you for your feedback!