I am trying to import customer info into magento2, but my old website use MD5 to store the passwords. Does magento2 support MD5 ? How to make MD5 work for magento2 ?


There is no need to add extra code or plugins to support the MD5 hash in Magento 2. If you want to import the passwords directly you just have to add ":0" after the raw password from Magento 1.

Magento 2 supports multiple versions to hash the password. Version 0 is MD5, which is used by Magento 1.

The passwords in Magento 2 are formatted as: {password hash}:{salt}:{hash version}

The passwords in Magento 1 are formatted as: {password hash}:{salt}

| improve this answer | |
  • Does this apply to password or password_hash, for importing customers by .csv? – zekia Oct 22 '18 at 9:55
  • Add it on password_hash field – Aurélien Jul 19 '19 at 8:51

I'd recommend using Magento's data migration tool for Magento 1 - Magento 2; it should move over the customer information for you, along other information as well. I believe that Magento 2 is using SHA256 and also support MD5 for password hashing for customer passwords.

Here's a link to download the tool: http://devdocs.magento.com/guides/v2.0/migration/bk-migration-guide.html

However, if you're curious, you could try just copy-pasting the encrypted passwords from one server to the next, and see if it works. I would recommend doing this on a test environment, and making sure that you back up the data. I've done this for a Magento 1 to Magento 1 site.

I hope this helps!

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.