How To Migrate Magento 1 To Magento 2
Merchants will not get official support and upgrades for Magento 1. x. The version reached EOL (End of Life) in June 2020.
More than 42,000 live sites are currently still using the Magento 1 version. Such websites are vulnerable to security risks.
Merchants are encouraged to move their stores to Magento 2. It offers the latest system upgrades, quality fixes, and patches.
We cover how to migrate from Magento 1 to Magento 2 for your store.
Steps to Migrate Magento 1 to Magento 2
1. Analyze Magento 1 Store
In today's competitive e-commerce landscape, many businesses are seeking out Magento 1 to Magento 2 migration services to keep up with the latest trends and ensure the best possible user experience for their customers. However, the Magento 1 to Magento 2 migration cost can be a concern for some businesses. To make the most of your investment, it's essential to carefully plan and execute the migration process, ensuring that you retain essential data and functionality while leaving behind unnecessary or outdated elements.
Review and analyze your Magento 1 store to decide what should be kept. You may have outdated data or plugins which are incompatible with the new version.
Review current extensions
List the extensions that you have installed on Magento 1. Check the following aspects:
- Identify the plugins you require for the new site.
- Remove unwanted plugins
- Replace incompatible plugins from Magento Marketplace
- Review the new Magento 2 extensions
- Check custom code on plugins
- Analyze which database assets you have to migrate
Review if your Magento 1 theme is compatible with Magento 2. If not, then you may have to buy a new theme as part of the Magento 1 to Magento 2 migration cost.
You can create a plan on how to customize the new theme and site design. It includes all site buttons, homepage, checkout funnel, and more.
Remove outdated data
You should remove outdated data from the database. It includes logs, site content, recently viewed products, compared products.
You can also audit the custom code to remove unwanted functions.
SEO analysis for the store
It is a concern that you may lose traffic while migrating your store using Magento 1 to Magento 2 migration services. The site ranking is affected as you change the content for the new pages.
Use Google Analytics to check your store’s ranking components. It includes:
- High performing keywords
- Fixing 404 errors
- Robots.txt File
- Sitemap.xml File
- Canonical tags
- Product details
By carefully considering these factors and working with a reputable provider of Magento 1 to Magento 2 migration services, you can successfully transition your e-commerce store to the latest platform version while minimizing downtime, maintaining SEO rankings, and ensuring a smooth experience for your customers.
Learn about Magento SEO marketing tips to increase site traffic.
2. Set up Magento 2
You have to install Magento 2 on your server for the migration. Ensure that you meet the Magento System Requirements.
Create the Magento file system owner and set permissions.
The overview of installation steps includes-
Download Magento software package - Magento installation options: Composer, Git, and Archive.
Create a database on your host
Upload Magento using FTP
Extract the files to your website’s directory
Agree and Setup Magento - It includes web configuration and customizing your store.
Create an Admin Account
Install and Finish.
3. Backup Magento 1 Store Data
Create a full backup of the Magento 1 store. It includes all files, folders, and the database.
Backups are stored in the
var/backups directory. It can be restored at any time using the magento setup:rollback command.
Backups ensure that you do not lose any data during the migration process.
4. Magento 2 Migration Process
Magento 2 offers two themes by default - Luma and Blank.
Luma is a user-friendly theme that can be customized. The Blank option lets you customize a theme.
You cannot migrate your Magento 1 theme to Magento 2 directly. The theme has to be compatible with the new version.
Buy a theme from the Magento Marketplace or third-party providers like ThemeForest.
You can also create a responsive and personalized theme for Magento 2.
Check which extensions can be added to the new Magento 2 version. Some of the Magento 1 plugins may not be compatible on M2.
Ensure that you only use the plugins that are necessary. That way your new site is optimized with relevant plugins.
You can migrate custom code using the Code Migration Toolkit.
Review the customization on your previous site. You may have to develop new custom code for M2.
You can also modify a few code functions using the PHP developer guide for Magento.
One of the last components is migrating M1 data to the Magento 2 version.
Magento has officially released Magento 2 Data Migration Tool. It helps migrate the store data and settings using CLI commands.
5. Install Data Migration Tool
You can install the Data Migration tool on Magento 2 using Composer.
Ensure that both the versions match before installing.
If you are using Magento version 2.2.0, you must install the Data Migration Tool version 2.2.0.
To find the version of your store, go to the root directory via SSH. Enter the following command:
php bin/magento --version
You also have to update the location of the tool’s package in the composer.json file.
To perform that, run the following commands:
composer config repositories.magento composer https://repo.magento.com composer require magento/data-migration-tool:<version>
For example- If you are using Magento version 2.2.0, you can add-
composer config repositories.magento composer https://repo.magento.com composer require magento/data-migration-tool:2.2.0
You will then be asked to add the authentication keys. Perform the following steps to get the keys-
- Go to the Magento Marketplace.
- Sign in using your login credentials
- Click on Access Keys under the My Products section.
If you already have keys, your public key is the username. The private key will be your password.
Create a new key pair by clicking the Create a New Access Key button.
Add the keys to finish the installation for the Data migration tool.
6. Configure Data Migration Tool
To configure the tool, you will require the configuration files.
The directories below will have the files for the Data Migration Tool.
<Magento 2 root dir>/vendor/magento/data-migration-tool/etc/opensource-to-opensource
The above files have the configuration and scripts. It is used to migrate from the M1 Open Source to M2 Open Source platform.
<Magento 2 root dir>/vendor/magento/data-migration-tool/etc/opensource-to-commerce
The above file contains scripts and configuration for M1 Open Source platform to M2 Commerce.
<Magento 2 root dir>/vendor/magento/data-migration-tool/etc/commerce-to-commerce
The above file contains the scripts for M1 Commerce to M2 Commerce.
You also have to create a
config.xml file in the relevant directory.
For example, if you are migrating data from M1 Open Source to M2 Open Source platform. In that case, go to the following-
<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.
config.xml in your 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 code above-
has the relevant database details of Magento 2.
- <crypt_key> is mandatory and has to be filled.
- It is the encryption key of Magento 1. The key is in the
<Magento 1 root dir>/app/etc/local.xmlfile, within the
The last step is to save the
7. Start the Migration
The data migration cloud involve the following migration steps-
The Data Migration Tool should have network access. It connects to Magento 1 and Magento 2 databases.
Stop all activities in Magento 1. x Admin Panel. Except for order management such as shipping, creating invoices, and so on.
Note: Such tasks must not be resumed until Magento 2 stores go live.
Stop all Magento 1.x cron jobs. Except for the ones required for migration.
Use the Data migration tool to migrate settings and websites. Ensure that you have migration service or expertise for the tool.
Copy your Magento 1. x media files to Magento 2. x.
You have to copy these files manually. It is done from the
Use the tool to bulk copy your data from the M1 database to the M2 database.
Some plugins have data you want to migrate.
It may have a different structure in the Magento 2 database. Use the mapping files provided with the Data Migration Tool.
Reindex all Magento 2.x indexers. You can check the indexers’ site for more details.
8. Make Changes to the Migrated Data
After migration, you may want to make slight changes. It includes different CMS pages, catalog structures, or sales rules.
It is essential to be cautious while migrating data manually. Any errors could affect the new site.
9. Upgrade Incremental Data
You can now continue to incrementally capture data updates. It is added to Magento 1 site such as new orders, reviews, and more.
You can transfer these updates to M2 using the Delta mode.
Start the incremental migration. The site updates will run continually.
Test your Magento 2 site to see if there are any issues.
Ctrl+Cto stop incremental migration. You can start it again after issues are resolved.
10. Go Live
Your Magento 2 site should be updated with Magento 1. Check if everything is working normally.
You can perform the next steps to move over to the new site:
Put the Magento 1 system in maintenance mode. This is where downtime starts.
Control+Cin the migration tool command window to stop incremental updates.
Start the Magento 2 cron jobs.
For the Magento 2 system, reindex the stock indexer.
Cache pages in advance of the customers using your storefront.
Perform final verification of the Magento 2 site.
Change the DNS, load balancers to point to new production hardware. It's where the downtime ends.
Magento 2 store is live. You can resume all activities for your store.
To get detailed insights, check out the Magento 2 Go Live checklist.
Magento Migration FAQ
Q: What is Magento migration?
A: Magento migration is the process of upgrading a website from an older version of Magento (such as Magento 1.9) to a newer version (such as Magento 2.2). This migration process typically involves transferring data, settings, and customizations from the old website to the new one.
Q: How do I migrate my Magento 1.9 site to Magento 2.2?
A: The migration process can be complex and requires technical expertise. It is recommended to hire a Magento developer or agency to handle the migration. The process typically involves creating a new Magento 2.2 site, transferring data from the old site to the new site, and updating any customizations or extensions.
Q: What is the cost of Magento 1 to 2 migration?
A: The cost of Magento migration can vary depending on the complexity of the site and the amount of customization required. It is recommended to get a quote from a Magento developer or agency to determine the cost.
Q: What are some common issues during Magento 1 to 2 migration?
A: Common issues during Magento migration can include data loss, broken links, broken extensions or customizations, and compatibility issues with third-party integrations. It is important to thoroughly test the new site after migration to ensure everything is working correctly.
Q: What is the Magento 2 migration script?
A: The Magento 2 migration script is a tool provided by Magento that can assist with migrating data from Magento 1 to Magento 2. The tool can transfer data such as products, customers, and orders from the old site to the new site.
Magento 2 offers the latest updates for your store. The latest versions of Magento 2 offer performance and security improvements.
The migration from Magento 1 to Magento 2 involves many steps as shown in this article. You can use the Magento Migration Checklist to keep up with all tasks. It is essential to test and review the site before going live. That way, you reduce any further issues and downtime.
To get more insights into Magento, check out MGT-Commerce blog.