139 Views

Magento is a top-notch e-commerce platform, powering over 250,000 websites. Despite its popularity, only 26% of Magento sites have upgraded to Magento 2, which offers advanced features and capabilities compared to Magento 1. Since support for Magento 1 ended in June 2020, it’s crucial for all Magento merchants to migrate to Magento 2 to ensure their stores remain secure and up-to-date.

Preparing for Magento 2 Migration

Before you begin the migration process, make sure to back up your Magento 1 store to avoid any data loss.

Prerequisites

To ensure a smooth migration, you’ll need to update your software to meet Magento 2’s requirements. For detailed information, check the software requirements for Magento 2 migration.

Data Migration Tool Requirements

The Data Migration Tool, a command-line interface (CLI) tool, facilitates data migration from Magento 1 to Magento 2. Ensure you have the latest version of Composer installed before proceeding.

Install Composer

Step-by-Step Magento 2 Migration Process

Step 1: Install Magento

Install the latest version of Magento on your local host or server.

Step 2: Install Data Migration Tool

Run the following commands:

sh

Copy code

composer config repositories.magento composer https://repo.magento.com composer require magento/data-migration-tool:2.4.3

Note: Replace 2.4.3 with the version of Magento 2 installed on your system. The system will prompt you for authentication keys, which you can find in your Magento Marketplace account under Access Keys.

Create a New Access Key or use an existing one. The Public Key will be your Username and the Private Key will be your Password.

Once the information is added, you will be able to successfully install the Data Migration Tool.

Step 3: Configure Data Migration Tool

Identify the current version of your Magento 1 store and navigate to the corresponding directory in the Magento 2 root folder:

bash

Copy code

vendor/magento/data-migration-tool/etc/opensource-to-opensource/<current_magento1_version>/config.xml

For example, if your Magento 1 version is 1.9.2.3, go to:

bash

Copy code

vendor/magento/data-migration-tool/etc/opensource-to-opensource/1.9.2.3/config.xml

In config.xml, locate and update the database details and crypt key:

xml

Copy code

<source>    <database host=”localhost” name=”your_m1_db” user=”your_user” password=”your_password” /> </source> <destination>    <database host=”localhost” name=”your_m2_db” user=”your_user” password=”your_password” /> </destination> <crypt_key><![CDATA[CRYPT_KEY]]></crypt_key>

Find your Magento 1 crypt key in app/etc/local.xml and copy it to the Magento 2 config.xml.

Step 4: Migrate Settings

Run the following command to migrate store and system configuration settings:

sh

Copy code

php bin/magento migrate:settings -a vendor/magento/data-migration-tool/etc/opensource-to-opensource/your_magento1_version/config.xml

Step 5: Migrate Data

Use this command to migrate data from Magento 1 to Magento 2:

sh

Copy code

php bin/magento migrate:data -a vendor/magento/data-migration-tool/etc/opensource-to-opensource/your_magento1_version/config.xml

Step 6: Delta Migration

Perform delta migration to transfer any new orders or catalog data:

sh

Copy code

php bin/magento migrate:delta -a vendor/magento/data-migration-tool/etc/opensource-to-opensource/your_magento1_version/config.xml

Media Files Migration

Database Media Files

  1. Log in to your Magento 1 Admin Panel.
  2. Go to System > Configuration > ADVANCED > System.
  3. Expand Storage Configuration for Media and select Media Database.
  4. Click Synchronize.

Repeat these steps in your Magento 2 Admin Panel.

File System Media Files

Copy all media files from your Magento 1 directory to Magento 2:

bash

Copy code

<Magento 1 install dir>/media <Magento 2 install dir>/pub/media

Note: Do not copy .htaccess files from Magento 1.

Theme and Extension Migration

You cannot directly migrate themes and extensions from Magento 1 to Magento 2 due to differences in structure. Use a pre-built Magento 2 theme or hire a skilled developer to adapt your Magento 1 theme and extensions.

Testing Your Magento 2 Store

After migration, thoroughly test your Magento 2 store:

  • Verify all features from your Magento 1 store.
  • Ensure payment and shipping methods work correctly.
  • Check products, categories, orders, and customer data.
  • Test the site from a user’s perspective.
  • Get feedback from others to ensure a seamless user experience.

Testing is crucial for ensuring your Magento 2 store runs smoothly and efficiently, providing a better user experience.

By following these steps, you can successfully migrate your store from Magento 1 to Magento 2, taking advantage of the enhanced features and security that Magento 2 offers.