A step-by-step guide to migration from Magento 1 to Magento 2

Ignitiv
10 min readMar 7, 2024

--

Do you have an online store running on the old Magento 1 version? It’s time to upgrade to Magento 2! Magento 1 is no longer getting updates or support from the company. It reached its end of life in June 2020. Over 42,000 websites still use Magento 1. x. These sites could have security issues. The company wants store owners to move to Magento 2. Magento 2 gets the latest system improvements, bug fixes, and security updates. This guide explains the steps to move your store from Magento 1 version to the newer Magento 2 version.

Table of Contents:

1. Introduction

1.1 The Need for Magento 1 to Magento 2 migration

1.2 End of Life for Magento 1

1.3 Advantages of Upgrading to Magento 2

2. Step 1: Review Your Magento 1 Store

2.1 Evaluate Installed Features

2.1.1 Check Extensions

2.1.2 Review Custom Code

2.1.3 Examine Theme Compatibility

2.2 Clean Up Your Database

2.2.1 Remove Old Data

2.2.2 Perform SEO Review

2.3 Seek Professional Assistance

3. Step 2: Set Up Magento 2

3.1 System Requirements

3.2 File Permissions and Database Setup

3.3 Installation Steps

3.3.1 Download Magento 2

3.3.2 Upload to Website Directory

3.3.3 Run Setup Wizard

3.3.4 Create Admin Account

4. Step 3: Back Up Magento 1

4.1 Importance of Full Backup

4.2 Backing Up Files, Folders, and Database

5. Step 4: The Migration Process

5.1 Theme Migration

5.1.1 Luma and Blank Themes in Magento 2

5.1.2 Theme Compatibility

5.1.3 Obtaining a New Theme

5.2 Extension Migration

5.3 Custom Code Migration

5.4 Data Migration

5.4.1 Products, Customers, Orders, Settings

5.4.2 Using the Data Migration Tool

6. Step 5: Install the Data Migration Tool

6.1 Tool Installation Prerequisites

6.2 Download and Extract the Tool

6.3 Tool Configuration

6.4 Running Data Migration Commands

6.5 Verifying Migration

6.6 Updating Store Configuration

7. Step 6: Configure the Migration Tool

7.1 Creating the Configuration File (config.xml)

7.2 Specifying Database Details

7.3 Setting Encryption Key and Other Options

8. Step 7: Start Migrating Data

8.1 Preparing for Data Transfer

8.2 Data Migration Tool Commands

8.2.1 Migrating Settings and Websites

8.2.2 Copying Media Files

8.2.3 Bulk Copying Database

8.2.4 Handling Extension Data

8.2.5 Reindexing in Magento 2

9. Step 8: Make Changes

9.1 PostMigration Modifications

9.1.1 CMS Pages

9.1.2 Product Catalogs

9.1.3 Sales Rules

10. Step 9: Migrate New Data

10.1 Handling Incremental Data

10.2 Using Delta Mode

10.3 Testing and Issue Resolution

11. Step 10: Go Live!

11.1 Final Steps Before Launch

11.1.1 Maintenance Mode for Magento 1

11.1.2 Stopping Incremental Migration

11.1.3 Initiating Magento 2 Cron Jobs

11.2 Launching the Magento 2 Store

11.2.1 Reindexing Stock

11.2.2 Caching Storefront Pages

11.2.3 Final Testing

11.2.4 Changing DNS for Magento 2

12. FAQs

13. Conclusion

13.1 Recap of Migration Steps

13.2 Importance of Professional Assistance

13.3 Benefits of Upgrading to Magento 2

Step 1: Review Your Magento 1 Store

Before you start, take a look at your current Magento 1 store. Make a list of all the extra features you have installed, like plugins and custom designs. Some of these might work with Magento 2, but others might need to be replaced.

Check Your Extensions

Make a list of all the extensions (plugins) you have installed on Magento 1. Look at each one and decide:

· Which ones do you need for your new site

· Which ones can you remove

· Which ones need to be replaced with a Magento 2 compatible version

You can find new Magento 2 extensions on the Magento Marketplace.

Check Your Custom Code

If you have any custom code added to your extensions, you’ll need to review that, too. Some of it might need to be updated or rewritten for Magento 2.

Look at Your Theme

Check if your current Magento 1 theme (design) can work with Magento 2. If not, you’ll need to purchase a new theme. Think about how you want to customize the new theme’s look and feel.

Remove Old Data

Go through your database and remove any old, outdated data you don’t need anymore. This includes things like logs, old content, and product comparison data.

SEO Review

One concern is that you might lose some website traffic during the move to Magento 2. Your search rankings could change because you’re updating your content. Use Google Analytics to check:

· Your best-performing keywords

· Any 404 error pages

· Your robots.txt and sitemap files

· Page titles and descriptions

Work with a good Magento service provider. They can help you move to Magento 2 while keeping your search rankings.

Step 2: Set Up Magento 2

Now, you need to install Magento 2 on your server for the Magento 1 to Magento 2 migration. Make sure your server meets all the system requirements.

Set the correct file permissions and create a new database for Magento 2.

Then follow these steps:

· Download the Magento 2 software

· Upload it to your website’s directory

· Run the setup wizard to configure Magento

· Create an admin account

Learn about 5 reasons to choose Magento when getting started with eCommerce.

Step 3: Back Up Magento 1

Before migrating any data, make a full backup of your Magento 1 store. Back up all files, folders, and the database.

This backup ensures you don’t lose any data if something goes wrong during Magento 1 to Magento 2 migration.

Step 4: The Migration Process

Here are the main things you need to migrate from Magento 1 to Magento 2:

Theme Migration

Magento 2 comes with two basic themes: Luma and Blank. Luma is user-friendly and customizable. Blank lets you build a custom theme from scratch.

(Image: Source)

You cannot directly migrate your old Magento 1 theme to Magento 2. The theme needs to be compatible with the new version.

You can buy a new theme from the Magento Marketplace or other providers like ThemeForest. Or, you can hire someone to create a custom Magento 2 theme for your new store.

Extension Migration

Review all the extensions (plugins) you use in Magento 1. Many of them may not be compatible with Magento 2.

Only install the extensions you really need on your new Magento 2 store. This will help keep your site optimized.

Custom Code

If you have any custom code in your Magento 1 store, you’ll need to migrate that, too. Magento provides a Code Migration Toolkit to help.

Review all your customizations. You may need to rebuild some custom functionality for Magento 2.

Data Migration

Finally, you need to migrate all your store data from Magento 1 to Magento 2. This includes things like:

· Products

· Customers

· Orders

· Settings

Magento provides an official Data Migration Tool to transfer this data using commands.

FUTURE-PROOF YOUR STORE — GET MAGENTO SUPPORT!

Step 5: Install the Data Migration Tool

You can install the Data Migration Tool on your Magento 2 site using Composer. But first, make sure the tool version matches your Magento 2 version.

To check your Magento version, go to the root directory and type:

php bin/Magento — version

Then, install the matching Data Migration Tool version. For example, if you have Magento 2.2.0, install version 2.2.0 of the tool.

You’ll need to get authentication keys from your Magento account to complete the installation.

Watch this: https://www.youtube.com/watch?v=6a3geXlqf4I

Steps to install the Magento 2 Data Migration Tool:

Prerequisites:

· Ensure you have a working Magento 2 installation.

· Download the Data Migration Tool from the Magento Commerce GitHub repository.

Extract the Tool

Extract the downloaded Data Migration Tool archive to a directory of your choice.

Configure the Migration Tool

· Navigate to the magento2/vendor/magento/data-migration-tool/etc/ directory.

· Copy the config.xml.dist file and rename it to config.xml.

· Open config.xml and update the database connection details for your Magento 1 and Magento 2 databases.

Run Data Migration Commands

Open a command prompt or terminal window and navigate to the Data Migration Tool directory.

Run the following commands:

bin/magento migrate: settings -r <path to your config.xml file>

bin/magento migrate: data -r <path to your config.xml file>

bin/magento migrate: delta -r <path to your config.xml file>

Migrate Settings, Data, and Delta

The migrate: settings command migrates the settings.

The migrate: data command migrates data.

The migrate: delta command performs the incremental data migration.

Verify Migration

After running the migration commands, verify the integrity of your Magento 2 store.

Check that products, customers, orders, and other essential data have been migrated successfully.

Update Store Configuration:

Update any custom configurations or extensions that were used in Magento 1 but might need adjustments in Magento 2.

Step 6: Configure the Migration Tool

Next, you need to configure the Data Migration Tool for your environment. It needs to know where to find your Magento 1 and Magento 2 databases.

Create a new config.xml file with details like:

· Magento 1 database name, username, password

· Magento 2 database name, username, password

· Magento 1 encryption key

Follow Magento’s instructions on where to create this file based on whether you’re migrating from Open Source or Commerce editions.

<?xml version=”1.0"?>

<config xmlns:xs=”http://www.w3.org/2001/XMLSchema-instance" xs:noNamespaceSchemaLocation=”urn:magento:module:Magento_DataMigrationTool:etc/config.xsd”>

<source>

<database host=”magento1_db_host” name=”magento1_db_name” user=”magento1_db_user” password=”magento1_db_password”/>

</source>

<destination>

<database host=”magento2_db_host” name=”magento2_db_name” user=”magento2_db_user” password=”magento2_db_password”/>

</destination>

<options>

<crypt_key>your_encryption_key</crypt_key>

</options>

<bulk_size>20</bulk_size>

<direct_document_copy>1</direct_document_copy>

<source_prefix>m1_</source_prefix>

<dest_prefix>m2_</dest_prefix>

<delta_mode>1</delta_mode>

<auto_resolve_urlrewrite_duplicates>1</auto_resolve_urlrewrite_duplicates>

<log_file>migration.log</log_file>

<progress_step>100</progress_step>

<data_transfer>

<map_file>map.xml</map_file>

</data_transfer>

<bulk_strategy_option>

<direct_document_copy>1</direct_document_copy>

</bulk_strategy_option>

</config>

In this example:

  • Replace magento1_db_host, magento1_db_name, magento1_db_user, and magento1_db_password with the details of your Magento 1 database.
  • Replace magento2_db_host, magento2_db_name, magento2_db_user, and magento2_db_password with the details of your Magento 2 database.
  • Set a unique encryption key for <crypt_key>your_encryption_key</crypt_key>.

Save this configuration file with the name config.xml. When running migration commands, you’ll reference this configuration file using the -r option.

Step 7: Start Migrating Data

Now, you’re ready to start transferring your store data!

First, stop all admin activities on your Magento 1 store, except for order management tasks.

Then use the Data Migration Tool’s commands to:

· Migrate settings and websites

· Copy media files from Magento 1 to 2

· Bulk copy database from Magento 1 to 2

· Handle any extension data

· Reindex in Magento 2

Step 8: Make Changes

After initial Magento 1 to Magento 2 migration, you may want to modify some things like:

· CMS pages

· Product catalogues

· Sales rules

Be very careful when manually changing migrated data to avoid errors on your new site.

Step 9: Migrate New Data

Your Magento 1 store is still running during migration, so new data is being added — things like:

· New orders

· Product reviews

· Other updates

Use the Data Migration Tool’s “Delta” mode to keep capturing and migrating this new incremental data over to Magento 2.

Test your Magento 2 site and fix any issues. You can pause and restart incremental migration as needed.

Step 10: Go Live!

Finally, your new Magento 2 store is ready! Follow these steps to launch:

1. Put your Magento 1 store in maintenance mode

2. Stop incremental data migration

3. Start Magento 2 cron jobs

4. Reindex stock

5. Cache storefront pages

6. Do final testing

7. Change DNS to point to Magento 2

Your Magento 2 store is now live!

Check Magento’s Go Live checklist for more details on a smooth launch.

FAQs

Q: Why should I migrate from Magento 1 to Magento 2?

A: Magento 1 reached end-of-life and stop receiving support. Migrating to Magento 2 provides access to the latest features, extensions, and security.

Q: What are the main methods to migrate to Magento 2?

A: The three main methods are: 1) Using the Magento Migration Tool yourself, 2) Hiring Magento specialists, or 3) Using an automated migration service.

Q: What is the recommended migration method?

A: Using an automated Magento 1 to Magento 2 migration service is generally recommended as the optimal solution.

Q: What data can be migrated from Magento 1 to 2?

A: Data like products, customers, orders, CMS pages, and more can be migrated. You can choose which data to move.

Q: Will extensions and themes also migrate?

A: Extensions and themes are not directly compatible between versions. You’ll need to find Magento 2 versions or recreate them.

Q: Can I keep my existing domain name after migrating?

A: Yes, some extension provides a service to change your DNS and allow you to retain your original domain.

Upgrade to Magento 2 now for the latest features and security!

Conclusion

Migrating from Magento 1 to Magento 2 involves many steps, but this guide breaks it down simply. Just take it one step at a time.

Remember, every store is different. You may need extra help from a Magento expert, especially for complex sites.

But making the move to Magento 2 will be worth it! Your store will be faster, more secure, and have the latest eCommerce features.

Don’t keep using the outdated Magento 1. Upgrade to Magento 2 today for a modern online store experience.

You can also read: Magento Managed Service

Let our experts handle your Magento 1 to Magento 2 migration — contact us now!

--

--

Ignitiv
Ignitiv

Written by Ignitiv

Ignitiv collaborates with clients to deliver eCommerce solutions that give results — revenue growth, better conversions and higher average order values. The lea

No responses yet