How to migrate only Customer logins and passwords to Magento 2?

Customer data is one of the most important elements -- especially when migrating from Magento 1 to Magento 2. What if the transfer doesn’t go smoothly? In eCommerce one of the worst scenarios is that the migrated customers may be unable to log in to the new Magento 2 instance.

Getting started with the customer data migration can be intimidating, but with a right migration tool, the process isn’t as hard as it seems. Fortunately, our UB Data Migration tool makes this very simple.

If you’re considering our migration tool, we have done the hard work for you and figured out how to automatically migrate customer logins and passwords to Magento 2 with ease. In this article, I’ll briefly go through the important change in the way Magento 2 store passwords, how to migrate only customer logins and passwords using UB Data Migration tool, and possible post-migration login issues as well.

SHA-256 -- The new hashing algorithm in Magento 2

As you might know, Magento Community Edition 1.9.x uses MD5 hashing algorithm. However since coming out, Magento Community Edition 2.x applies the new SHA-256 hashing algorithm over the old MD5 in Magento 1.

In a nutshell, SHA-256 stands for Secure Hash Algorithm which is used in Magento 2 to hash passwords. This is an industry-standard pattern of storing passwords using a one-way hash. You can not reserve hash to retrieve original password string. One possibility to find another string which has the same hash value is by trying every single possible value (called brute force method). However this brute-forcing mechanism is time-consuming and prohibitively expensive, which ensures the security of hashed passwords.

You might consider additional enhancement to safeguard customer data such as using PHP native password API, but this topic needs a separate article though.

How to transfer only customer logins and passwords to Magento 2?

It is almost a no-brainer that you should be using a migration tool when planning to migrate customer data to Magento 2. Our UB Data Migration is one option, but that doesn’t necessarily mean it’s the only choice for you.

If you’re considering our UB Data Migration Pro tool, here is a brief overview of three simple steps (out of 8-visualized steps) required to transfer only customer data to Magento 2.

Step 1 | Database Settings

Step 1 - Migration Settings | Database

Step 1 -- Migration Settings | Database

Step 2 | Migrate Sites, Stores

Step 2 - Migration Settings | Sites, Stores

Step 2 -- Migration Settings | Sites, Stores

Step 6 | Migrate Customers

Step 6 - Migration Settings | Customers

Step 6 -- Migration Settings | Customers

This seems like a lot of work, but with the help of UB Data Migration tool, the migration process is getting easier all the time. In most cases, our users followed the workflow above to transfer customer data to Magento 2 smoothly. This case study -- Winetasting successfully migrates 324,000 customers to Magento 2 -- gives you a clear takeaway about how easily you can implement the migration process.

Common questions on Customers’ password changes

When migrating customer data, some of our users are worried about whether the password changes will occur after the migration is complete. And here are a few common questions that they asked my team:

Will all original customer passwords in Magento 1 remain unchanged in Magento 2?
Yes, if you use our migration tool. Your customers can login Magento 2 instance using their old Magento 1 logins and passwords. No need to change or reset their passwords after migration.

Can my old MD5 password in Magento 1 be used in Magento 2?
The answer is Yes too. Our migration tool takes advantage of backward compatibility in Magento 2, which supports both MD5 and SHA-256 algorithm. The (migrated) customer passwords in Magento 2 remain to be 128-bit (16-byte) MD5 hashes.

After migration, if my users change their passwords in Magento 2, the new passwords will be hashed using MD5 or SHA-256 algorithm?
The initial migrated customers’ passwords are MD5 hashes. However, upon customers’ activities such as logging-in, changing or resetting the passwords, such MD5 passwords will be automatically hashed using SHA-256 algorithm.

Going through these manual password changes is repetitive for each customer though. Ultimately, be it from a system administrator’s perspective, it is easy to upgrade all migrated passwords at once to SHA-256 algorithm using the command: Php -f bin/magento customer:hash:upgrade (this is optional)

Post-migration login issues

In most cases, our users successfully completed their customer data migration, and everything has been working absolutely fine. In rare cases, post-migration login issue is in place. Let’s go over the two most common circumstances that a ‘migrated’ customer fails to log in to Magento 2.

Incorrect login credentials
This is an initial check you should carry out in the first place. You can transparently and quickly determine whether the issue only associates with Magento 2 instance or not.

Not setting up migrated store as default
Upon current workflow of our UB Data Migration tool, your Magento 1 data will be migrated into a separated website in Magento 2.

Since Magento supports the setting up of multiple websites, customer accounts can be set to Per Website, it’s utmost important to set the ‘migrated’ website as default Website in Magento 2. Otherwise, a migrated customer account won’t be able to log in to it on the storefront.

Note our migration tool also supports ‘Merge Default Website’ option, which allows you to merge your Magento 1 data into existing default website of Magento 2. If you turn on this setting, your customers should be able to log in Magento 2 site normally right after migration complete.


Whether you’re planning to migrate only customer data or full Magento 1 data, using our UB Data Migration tool allows you to automate the task of migrating, with very little technical know-how. We have done all the hard work for you and figured out how to speed up and simplify your migration.

Have you migrated your customer data from Magento 1 to Magento 2? Did it work well? If you have any tips for making the process go more smoothly, share them in the comments below.

Written By

  • Jignesh Parmar

    No doubt Magento is one of a market leaders.You can create the best designs or website with Magento platform.Thanks for sharing these points.Nice article. You’ve made a great summary here! Looking forward to more of them! Also, I found this article which is equally interesting; you might want to take a look: