blog-image
Pankaj Sakariya
June 6, 2019

Your Ultimate Guide on Magento 1 to Magento 2 Migration

Magento

The final date is up very close.

The Magento team (now part of the Adobe family) has officially announced that the support for Magento 1 will end in June 2020. This is very big news, especially for small business owners. Why? If they do not migrate Magento 1 to Magento 2 after this date they will be on their own as far as anything that their website requires. The official support is coming to a formal end. Result? Do not expect any official patches or security updates from now onwards. Although Magento 2 migration has become imperative, it is not that easy, especially when you are migrating your entire online store. It is a very significant step that requires total attention.

The problem is, even if you are moving from one platform version to another, it is not going to be easy. Especially there is no “magical” one-click button that will make it work instantly. While migrating from Magento 1 to Magento 2, you need to deal with the theme, customisation, database import, and extension issues. It might feel frightening if you think for a moment. The positive part is, the time and resources required for database transfer can be reduced significantly.

In the forthcoming sections of this write-up, we have comprehensively provided information pertaining to Magento 1 to Magento 2 migration steps coupled with reasons that make it imperative to migrate from Magento 1 to Magento 2. We will address some of the popular FAQs that are in the minds of people while migrating to Magento 2 like Magento 1 to Magento 2 migration cost. We promise after reading this content piece you will be in a far more comfortable position to decide on whether you want to migrate from Magento 1 to Magento 2 (although there is hardly any option left for businesses.)

Let’s now divert our attention to the reasons that strongly imply to migrate from Magento 1 to Magento 2.

Why Migrate from Magento 1 to Magento 2?

Although, in the previous year there was a lot of talk about the end of Magento 1 very soon that has hardly happened. Today, updating Magento store to Magento 2 is not considered to be a pressing issue rather you can consider it to be a huge opportunity. These are some of the most common situations when migrating to Magento 2 is highly advisable for your business.

  • Large number of visitors has an adverse effect on the website performance

Every time your online store sees a large number of visitors there is a lot of stress put in on the eCommerce store. This makes migrating to Magento 2 highly inevitable. Remember, a large number of visitors can lead to broken pages, slow download, and poor visitor experience that can essentially harm the reputation of your eCommerce store.

  • Conversion rates decline gradually

While managing an online store it is important to scrutinise key indexes on a daily basis. It is equally important to consider the conversion rate. If the conversion rate of your online store is gradually increasing it means that your marketing campaign is yielding positive results. In case, it is not, you need to employ a platform that can assist you in getting the best conversion rate. This can work in your favour especially when you migrate from Magento 1 to Magento 2. The great news is, Magento 2 utilises the same interface and structure as Magento 1. But, the positive part is it has enhanced functionality which can help you migrate to a brand new shopping cart.

  • For high extensibility

The very purpose for commencing the online store is to optimise its flow for the better user experience of customers. This way it works fine. With time, you need an advanced eCommerce functionality that can assist you to get high scalability. That can be achieved by migrating to Magento 2.

  • In order to handle the orders in a timely manner

After sometime when your eCommerce store flourishes and starts delivering results the purchases will increase which can put a lot of pressure on your online store to handle all the orders in a timely manner. By migrating to Magento 2 you can achieve this endeavour with ease.

  • To get an edge over your competitors

It is extremely critical for online businesses to constantly upgrade itself with new technologies. If you do not adapt to the new technology, chances are your customers will move to another online store that provides a superlative user experience. The best way to combat this situation is by migrating to Magento 2.

Now, that you have understood the reasons that make it imperative to migrate from Magento 1 to Magento 2 it is time to look at the migration steps in the next section.

Magento 1 to Magento 2 Migration Steps:

There are in all six steps that need to be followed while migrating from Magento 1 to Magento 2. They are:

  1. Stock M2 installation
  2. Data migration
  3. Theme migration
  4. Migrating extensions
  5. Delta migration
  6. Test, test, test

Let’s look at these steps in details.

But, before we do that it is important to look at the software and hardware requirements to help it function well.

Remember, Magento 2 will not work efficiently on outdated software. Worst case, it will not work on PHP5. The server should have the following programs installed to make it function well:

PHP: 7.0.13+ or 7.1.x

MySQL: 5.6, 5.7 or MariaDB 10.0, 10.1, 10.2 or Percona 5.7

PHP Extensions required: ctype, hash, json, PDO/MySQL, spl, iconv, bc-math, mcrypt, curl, gd, intl, dom, openssl, SimpleXML, soap, libxml, xsl, zip, mbstring

Hardware recommendations: A minimum of 2G of RAM and 24GB + SSD (Solid State Drive)

Remember, Magento 2 will not work with anything less than 2G of RAM. While SSD technology will increase its running speed.

As promised, let us now divert our attention to the migration steps.

Step 1: Stock Magento 2 Installation

Commence by installing a fresh copy of the latest Magento 2 software. Grab the latest version of Magento 2 Open Source from the official website. At the time of writing, it is 2.3.0

Magento 2 Migration - 1Once you have downloaded it. Install it on the basic virtual private server (VPS) with 2G of RAM and 24GB of SSD space.

We have employed Nginx and PHP-FPM 7.1.

Note: Pairing Nginx with Magento 2 is amazing. Reason? The latter comes with a premade configuration file, i.e.; nginx.conf.sample.

When everything is ready, open a new browser and commence the installation process.

Magento 2 Migration - 2Do not forget to check whether you have all the PHP extensions installed otherwise it will fail the setup process. If you do not have it installed, use the following command (we have employed Debian 9):

apt-get install php7.1-curl php7.1-mcrypt php7.1-bcmath

Then press the “Install Now” button to commence.

Magento 2 Migration - 3(Install log)

After a while, the “Success” message will be displayed. In our case, it took half a minute i.e.; 30 seconds.

Now, that you have created a new Magento 2 store, it is time to migrate data from the old Magento 1 site.

In our case, our old Magento 1 site is not that old. It is, in fact, a new Magento 1.9.3.7 install loaded with sample data.

If you wish, download it from the official website.

Let’s now focus on the second step.

Step 2: Magento 2 data migration process

The Magento team has already simplified the Magento 2 migration process. How? By having an automatic Magento Migration Tool (MMT).

This is a program that will act as a blessing in disguise to transfer data from your old Magento 1 installation to the new Magento 2 store.

In order to do this successfully, you will require SSH (Secure Shell) access to perform a migration. You can get it from your system administrator or your hosting support team.

Install the MMT from repo.magento.com by employing a PHP package manager software known as a composer.

In case, if you have not already installed composer, do it now.

With the help of Magento Migration Tool installation it will be possible to place the files into a Magento 2 folder. We set it up in the previous step. Use these commands inside the folder:

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

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

Take a note of the 2.3.0 at the end of the second command.

This is our Magento 2 platform version.

If you are migrating to a different version, change the command accordingly.

After running the composer require, the system will prompt you for your authentication keys.

You can get these by going to My Profile on Magento Marketplace website.

Magento 2 Migration - 5(My Profile Magento Marketplace)

Click on “Access Keys” under “My Products” menu.

Magento 2 Migration - 6(Access Keys Magento Marketplace)

In case, if it is required, create a new Access key.

The next step is, to employ the Public Key as the username and Private Key as a Password.

After entering the information, you should be able to install the data migration tool successfully.

root# composer require magento/data-migration-tool:2.3.0

./composer.json has been updated
Loading composer repositories with package information
Updating dependencies (including require-dev)
Package operations: 1 install, 0 updates, 0 removals
- Installing magento/data-migration-tool (2.3.0): Downloading (100%)
Writing lock file
Generating autoload files

The next step is to configure the tool.

Go to the Magento 2 root folder and find the following directory:

vendor/magento/data-migration-tool/etc/opensource-to-opensource/1.9.3.7

Copy config.xml.dist file to config.xml.

Replace 1.9.3.7 with your site’s Magento 1 version and change opensource-to-opensource to opensource-to-commerce i.e.; if you are migrating from Community Edition to Enterprise (now known as Commerce).

Open config.xml and try to find the code block given below:

<source>
    <database host="127.0.0.1" name="magento1" user="root" />
</source>
<destination>
    <database host="127.0.0.1" name="magento2" user="root" />
</destination>

The next step is to enter the Magento 1 and Magento 2 database credentials.

Do not forget to include password attribute like this:

<source>
     <database host="127.0.0.1" name="magento1" user="magento1" password="magento1"/>
</source>
<destination>
    <database host="127.0.0.1" name="magento2" user="magento2" password="magento2"/>
</destination>

Inside the <options> tag, do not forget to enter another mandatory field:

<options>
……
<crypt_key>Magento1-Encrypted-Key</crypt_key>
…
</options>

Find out your M1 crypt_key within the app/etc/local.xml file inside the root folder of your old site:

Magento 2 Migration - 7

Settings Migration

The next step is to commence the actual data migration.

The very first thing to do is to migrate settings. This can be done by going to the Magento 2 root folder and run the following command:

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

Ensure that you provide the correct path to your config.xml.

In our case, there were no errors, so the settings migration was absolutely spot on:

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

Magento 2 Migration - 8
# php bin/magento migrate:data --auto vendor/magento/data-migration-tool/etc/opensource-to-opensource/1.9.3.7/config.xml

Magento 2 Migration - 9

This is a very simple example. But your eCommerce store might have to deal with more complex issues than a stock installation. In such a scenario, the best thing to do would be to change the following default setting in the XML configuration file:

vendor/magento/data-migration-tool/etc/opensource-to-opensource/1.9.3.7/config.xml:
<settings_map_file>etc/opensource-to-opensource/settings.xml.dist></settings_map_file>

Also, do not forget to set the right filename in config.xml!

<settings_map_file>etc/opensource-to-opensource/settings.xml</settings_map_file>

Next step, open the settings.xml and closely scrutinise its content.

If you wish to ignore a particular setting, execute this command:

<ignore>
   <path>path/to/setting</path>
</ignore>

To rename:

<rename>
   <path>crontab/jobs/system_backup/schedule/cron_expr</path>
   <to>crontab/default/jobs/system_backup/schedule/cron_expr</to>
</rename>

It is possible to set up settings.xml whichever way you need.

Initial Data Migration

It is time to transfer customers, orders, and the actual store data. Execute the following command:

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

Migration of Media Files

There are certain things that you can expect to manually transfer like images.

Note: If you have been storing your media in the database then it will get automatically transferred to Magento 2.

Sync it prior to data migration by executing the following command:

Magento 1 backend menu > System > Configuration > Advanced > System

Click on a Synchronize button

Magento 2 Migration - 9(Synchronize Media)

In the above-mentioned screenshot, we have stored the media in a file.

To copy the data to Magento 2, simply copy the M1:media folder to M2:pub/media by executing this command:

cp -r /path/to/magento1/media /path/to/magento2/pub

After this step, re-index the Magento 2 store by using the command given below:

php bin/magento indexer:reindex

The next step is to recompile it by using the command given below:

php bin/magento deploy:mode:set production

This way you will have all your Magento1 products along with their images on your Magento 2 website.

Step 3: Magento 1 to Magento 2 Theme Migration

It is always a good option to go with a premade Magento 2 theme to save lots of time.

You can even port your prevailing Magento 1 theme. But, if you do that, be prepared to dig deep into Magento 2 internals.

Most of the time, it is advised to avail the services of a seasoned Magento 2 developer.

While migrating the theme, keep these things in mind:

The XML structure of Magento 2 is quite different from Magento 1. Hence, if you plan to simply copy and paste the layout files, forget it.

Magento 2 replaces the prototype JS framework with Magento 1’s jQuery.

CMS syntax is the same. In this case, you can always make CMS pages work with little to no effort.

We recommend you to employ your newly created Magento 2 theme in the default Luma theme. This way you will have a strong framework to work with.

Magento 2 provides three different running modes. Default mode, developer mode, and production mode. The developer mode is quite handy to develop new features. While production mode can be employed once the website is live.

Step 4: Magento 2 Extension Migration

Always remember Magento 1 plugins will not work with Magento 2.

We are unaware of a migration coding tool that can magically transform a Magento 1 module into a Magento 2 compatible extension. Most of the work needs to be done on a manual basis.

The best advice that we can give you is to have a handy list of Magento extensions with you that want to integrate into your Magento 2 website.

The next step is to hire a professional Magento 2 developer who can offer Magento 2 migration services to refactor your extensions. Alternatively, you can also search for options yourself.

Step 5: Delta Magento 2 Migration

Once you are done with the initial data migration, theme migration, customisations and extension migrations it is time to go live.

The last step is to transfer any new customers (products) or new orders that have been created in the production since you migrated from Magento 1 to Magento 2.

Starting from scratch would not be a wise decision. Why? You might suffer from the loss of all your customisations. This is where the delta migration feature is quite useful.

With the help of this data migration tool, it is possible to migrate selected changes effected. The best part is, it is possible to run these incremental changes as many times as possible.

The command is very simple:

php bin/magento migrate:delta /path/to/config.xml

In our sample 1.9.3.7 – > 2.3.0 case, it would be:

MAgento 2 Migration - 10

Things to Keep in Mind While Performing Delta Migration

  1. Remember, it is not possible for delta configuration to track all the changes that Magento 1 database might have.
  2. After the primary migration process, do not make any changes to orders, products, and customers that includes adding or removing them from and to your new Magento 2 database. Reason? This will break the sequence of the delta migration process.
  3. Never make any changes in the inventory levels in Magento 1 or Magento 2 as it may not be able to be deciphered by the delta script.

Step 6: Test, test, test

The final and the most important step in the Magento 1 to Magento 2 migration process is to test your newly created Magento 2 before it is up and running.

  • Prepare a list of all the extensions in your prevailing Magento 1 store and scrutinise them one at a time.
  • Ensure that all the payment methods are working and the money is getting captured.
  • If there are any intricate shipping setups ensure that they are up and running as per the mechanism.
  • Conduct regular checks to find out any minute mistake in the Magento 2 store.
  • Ensure that your online store is user-friendly, profitable, and stable.
  • Your Magento 2 store needs to work quite efficiently to drive more sales and profits.

Now, that you are aware of the Magento 1 to Magento 2 migration process, it is time to look at some of the FAQs that will help you to get a comprehensive overview of this new Magento migration.

Magento 2 Migration FAQs

Let’s now get up close with some of the questions that you might have pertaining to this new Magento version and answer all of them to clarify your doubts.

Q1. What is the time duration for migrating my eCommerce website from Magento 1 to Magento 2?

Ans: The migration process from Magento 1 to Magento 2 is totally contingent on the size and complexity of a website. A basic Magento website with fewer functionalities and products can be migrated easily within a couple of months’ time. For a medium-sized eCommerce website with a decent amount of data and slightly advanced feature, it may take a maximum of six months. While if you have a functionality-rich and an eCommerce store with heavy installation it might take in excess of six months.

Q2. What is the estimated cost for migrating from Magento 1 to Magento 2?

Ans: Most of the time, the cost of the Magento 2 migration depends on the functionalities, migration project timelines, and the size of the data. For small eCommerce website owners, the cost might be in the region of $5,000. For mid-sized Magento stores, the cost might be approximately $50,000. For large inventory based eCommerce websites, the cost might exceed $1,00,000.

Q3. What will occur to the Magento 1 extensions after successful migration to Magento 2?

Ans: Most of the time, the popular Magento extensions that you are using in Magento 1 will be there in Magento 2. In case, any extension is not available, our extension specialists in the development team will develop them from scratch to ensure that you get the maximum advantage from it.

Q4. Will there be any downtime during the migration?

Ans: The migration from Magento 1 to Magento 2 will be smooth without any downtime.

All the best!!

In case, you are facing any concerns while migrating from Magento 1 to Magento 2, contact us today and our experienced Magento developers will ensure smooth migration for your online store.

Read More

Popular posts like this

Consultation

Free

Get a definite increase in the sales enquiries on your eCommerce store by contacting our highly approachable sales team today!

No Credit Card Required, No Commitment, No Cash.