{"id":16523,"date":"2018-08-28T14:51:44","date_gmt":"2018-08-28T12:51:44","guid":{"rendered":"https:\/\/belvg.com\/blog\/?p=16523"},"modified":"2023-11-01T13:58:21","modified_gmt":"2023-11-01T11:58:21","slug":"converting-customer-password-hashes-from-wordpress-to-magento-2","status":"publish","type":"post","link":"https:\/\/belvg.com\/blog\/converting-customer-password-hashes-from-wordpress-to-magento-2.html","title":{"rendered":"Converting Customer Password Hashes from WordPress to Magento 2"},"content":{"rendered":"\n<p>In some projects developers may face the problem of migrating the data from various other platforms to Magento 2: for example, the site may have previously worked on another CMS system, but we want to keep the already existing products, users and other entities in it. At the same time, when migrating users, we can migrate all the data to Magento except for password hashes, because they are encrypted differently in another system: use a different algorithm, another combination of salt and the password itself, etc.<\/p>\n<p><!--more--><\/p>\n<p>As a result, after such a migration, a customer will not be able to log into the updated site and will have to use the password recovery system. How can we avoid it without creating unnecessary inconveniences for a customer? Let&rsquo;s see how it works using the example of migrating customers from WordPress.<\/p>\n<p>First of all, we save the necessary user data from WordPress to our Magento database, including password hashes in the form they were received from WordPress:<\/p>\n<p><a href=\"https:\/\/belvg.com\/blog\/wp-content\/uploads\/2018\/08\/joxi_screenshot_1535111596000.png\"><img decoding=\"async\" loading=\"lazy\" class=\"lazy alignnone\" src=\"https:\/\/belvg.com\/wp-content\/uploads\/2019\/06\/pixel.png\" data-src=\"https:\/\/belvg.com\/blog\/wp-content\/uploads\/2018\/08\/joxi_screenshot_1535111596000.png\" alt=\"Saving the necessary user data from WordPress to our Magento database, including password hashes in the form they were received from WordPress\" width=\"1085\" height=\"784\" title=\"Converting Customer Password Hashes from Wordpress to Magento 2\"><\/a><\/p>\n<p>The idea behind it is to change the password hash obtained from the previous system into the native Magento one when we have access to the unhashed password,&nbsp;i.e. while logging in. To do this, create an observer using the <em>controller_action_predispatch_customer_account_loginPost<\/em> event, which is called before the <em>\\Magento\\Customer\\Controller\\Account\\LoginPost<\/em> controller. For this purpose we should create a new module, and inside it &mdash; the <em>\/app\/code\/YourVendor\/PasswordHashConverter\/etc\/events.xml<\/em> file:<\/p>\n<pre class=\"lang:xhtml decode:true\">&lt;?xml version=\"1.0\"?&gt;\r\n&lt;config xmlns:xsi=\"http:\/\/www.w3.org\/2001\/XMLSchema-instance\" xsi:noNamespaceSchemaLocation=\"urn:magento:framework:Event\/etc\/events.xsd\"&gt;\r\n&nbsp;&nbsp;&lt;event name=\"controller_action_predispatch_customer_account_loginPost\"&gt;\r\n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;observer name=\"customer_upgrade_password\" instance=\"YourVendor\/PasswordHashConverter\\Observer\\UpgradeCustomerPasswordObserver\" \/&gt;\r\n&nbsp;&nbsp;&lt;\/event&gt;\r\n&lt;\/config&gt;<\/pre>\n<div class=\"module_in_content_container\"><a href=\"https:\/\/belvg.com\/magento-audit\" class=\"link_to_module\" target=\"_blank\" rel=\"noopener\"><\/a><div class=\"module_content\"><div class=\"module_content_part\"><h3 class=\"title\">Magento Audit<\/h3><p class=\"module_content_text\">Take your online store to the next level with BelVG Magento Audit<\/p><a href=\"https:\/\/belvg.com\/magento-audit\" class=\"link_2_to_module\" target=\"_blank\" style=\"display:inline-block\" rel=\"noopener\"><span class=\"read-more\">Visit the page<\/span><\/a><\/div><\/div><\/div>\n<p>Besides that, we will need to compare the password entered by a customer with the original hash from WordPress.&nbsp;We do it with the help of the&nbsp;<a href=\"http:\/\/www.openwall.com\/phpass\/\" target=\"_blank\" rel=\"noopener\">Portable PHP hash framework<\/a>, used in WordPress for these purposes. Save it to our module as <em>\/app\/code\/YourVendor\/PasswordHashConverter\/PasswordHash.php.<\/em> For further use in our code, write it to <em>\/app\/code\/YourVendor\/etc\/di.xml<\/em>, specifying its signature of the two received parameters:&nbsp;<em>iteration_count_log2<\/em> and <em>portable_hashes<\/em>:<\/p>\n<pre class=\"lang:xhtml decode:true\">&lt;?xml version=\"1.0\"?&gt;\r\n&lt;config xmlns:xsi=\"http:\/\/www.w3.org\/2001\/XMLSchema-instance\" xsi:noNamespaceSchemaLocation=\"urn:magento:framework:ObjectManager\/etc\/config.xsd\"&gt;\r\n&nbsp;&nbsp;&lt;type name=\"YourVendor\/PasswordHashConverter\\PasswordHash\"&gt;\r\n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;arguments&gt;\r\n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;argument name=\"iteration_count_log2\" xsi:type=\"number\"&gt;8&lt;\/argument&gt;\r\n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;argument name=\"portable_hashes\" xsi:type=\"boolean\"&gt;true&lt;\/argument&gt;\r\n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;\/arguments&gt;\r\n&nbsp;&nbsp;&lt;\/type&gt;\r\n&lt;\/config&gt;<\/pre>\n<p>It only remains to create an observer that will implement the functionality we need.<\/p>\n<p><em>\/app\/code\/YourVendor\/PasswordHashConverter\/Observer\/UpgradeCustomerPasswordObserver.php:<\/em><\/p>\n<pre class=\"lang:php decode:true\">&lt;?php\r\nnamespace YourVendor\/PasswordHashConverter\\Observer;\r\nuse Magento\\Framework\\Event\\ObserverInterface;\r\nuse Magento\\Customer\\Model\\ResourceModel\\CustomerRepository;\r\nuse Magento\\Customer\\Model\\CustomerRegistry;\r\nuse YourVendor\/PasswordHashConverter\\PasswordHash;\r\nclass UpgradeCustomerPasswordObserver implements ObserverInterface\r\n{\r\n&nbsp;&nbsp;\/**\r\n&nbsp;&nbsp;&nbsp;* Encryption model\r\n&nbsp;&nbsp;&nbsp;*\r\n&nbsp;&nbsp;&nbsp;* @var EncryptorInterface\r\n&nbsp;&nbsp;&nbsp;*\/\r\n&nbsp;&nbsp;protected $encryptor;\r\n&nbsp;&nbsp;\/** @var \\BelVG\\Encryption\\PasswordHash class from WordPress *\/\r\n&nbsp;&nbsp;protected $WpPasswordHasher;\r\n&nbsp;&nbsp;\/**\r\n&nbsp;&nbsp;&nbsp;* @var CustomerRegistry\r\n&nbsp;&nbsp;&nbsp;*\/\r\n&nbsp;&nbsp;protected $customerRegistry;\r\n&nbsp;&nbsp;\/**\r\n&nbsp;&nbsp;&nbsp;* @var CustomerRepository\r\n&nbsp;&nbsp;&nbsp;*\/\r\n&nbsp;&nbsp;protected $customerRepository;\r\n&nbsp;&nbsp;public function __construct(\r\n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;EncryptorInterface $encryptor,\r\n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;CustomerRegistry $customerRegistry,\r\n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;CustomerRepository $customerRepository,\r\n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;PasswordHash $WpPasswordHasher\r\n&nbsp;&nbsp;) {\r\n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;$this-&gt;encryptor = $encryptor;\r\n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;$this-&gt;WpPasswordHasher = $WpPasswordHasher;\r\n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;$this-&gt;customerRegistry = $customerRegistry;\r\n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;$this-&gt;customerRepository = $customerRepository;\r\n&nbsp;&nbsp;}\r\n&nbsp;&nbsp;\/**\r\n&nbsp;&nbsp;&nbsp;* Upgrade customer password hash when customer has logged in\r\n&nbsp;&nbsp;&nbsp;*\r\n&nbsp;&nbsp;&nbsp;* @param \\Magento\\Framework\\Event\\Observer $observer\r\n&nbsp;&nbsp;&nbsp;* @return void\r\n&nbsp;&nbsp;&nbsp;*\/\r\n&nbsp;&nbsp;public function execute(\\Magento\\Framework\\Event\\Observer $observer)\r\n&nbsp;&nbsp;{\r\n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;$requestParams = $observer-&gt;getEvent()-&gt;getData('request')-&gt;getParams();\r\n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;$username = $requestParams['login']['username'];\r\n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;$password = $requestParams['login']['password'];\r\n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;try {\r\n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;\/** @var \\Magento\\Customer\\Api\\Data\\CustomerInterface *\/\r\n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;$customer = $this-&gt;customerRepository-&gt;get($username);\r\n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;$customerSecure = $this-&gt;customerRegistry-&gt;retrieveSecureData($customer-&gt;getId());\r\n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;$hash = $customerSecure-&gt;getPasswordHash();\r\n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;if ($this-&gt;WpPasswordHasher-&gt;CheckPassword($password, $hash)) {\r\n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;$customerSecure-&gt;setPasswordHash($this-&gt;encryptor-&gt;getHash($password, true));\r\n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;$this-&gt;customerRepository-&gt;save($customer);\r\n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;}\r\n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;} catch (\\Exception $e) {\r\n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;}\r\n&nbsp;&nbsp;}\r\n}<\/pre>\n<p>The Observer checks if the password matches the old hash from WordPress, and if it finds one, it converts the password to the Magento format. If the match is not found (we have already changed the hash to a new one, or simply entered a wrong password), our observer will not do anything (the catch block in its implementation is left empty for this purpose). The native Magento mechanism for validating the login and password will be launched after the execution of our code, and thus the authorization will be completed as usual.<\/p>\n<div class=\"module_in_content_container\"><a href=\"https:\/\/belvg.com\/magento-custom-development\" class=\"link_to_module\" target=\"_blank\" rel=\"noopener\"><\/a><div class=\"module_content\"><img src=\"https:\/\/belvg.com\/blog\/wp-content\/uploads\/2019\/01\/magento-custom-development.png\" width=\"120\" height=\"120\" alt=\"magento custom development\" class=\"module_image\" title=\"Converting Customer Password Hashes from Wordpress to Magento 2\"><div class=\"module_content_part\"><h3 class=\"title\">Magento Custom Development<\/h3><p class=\"module_content_text\">Take your online store to the next level with BelVG Magento Custom Development <\/p><a href=\"https:\/\/belvg.com\/magento-custom-development\" class=\"link_2_to_module\" target=\"_blank\" style=\"display:inline-block\" rel=\"noopener\"><span class=\"read-more\">Visit the page<\/span><\/a><\/div><\/div><\/div>\n<p>As a result, for all imported and logged users the password will be encrypted according to the Magento standards, and will not differ from the newly registered ones:<\/p>\n<p><a href=\"https:\/\/belvg.com\/blog\/wp-content\/uploads\/2018\/08\/joxi_screenshot_1535114489833-11.png\"><img decoding=\"async\" loading=\"lazy\" class=\"lazy aligncenter wp-image-16531 size-full\" src=\"https:\/\/belvg.com\/wp-content\/uploads\/2019\/06\/pixel.png\" data-src=\"https:\/\/belvg.com\/blog\/wp-content\/uploads\/2018\/08\/joxi_screenshot_1535114489833-11.png\" alt=\"Passwords encrypted according to the Magento standards\" width=\"1384\" height=\"754\" title=\"Converting Customer Password Hashes from Wordpress to Magento 2\"><\/a><\/p>\n<p>The described mechanism is suitable not only for WordPress but also for any other engine, from which we can extract the password hashing mechanism and use it for verification.<\/p>\n<div class=\"module_in_content_container\"><a href=\"https:\/\/belvg.com\/migration-to-magento-2\" class=\"link_to_module\" target=\"_blank\" rel=\"noopener\"><\/a><div class=\"module_content\"><img src=\"https:\/\/belvg.com\/blog\/wp-content\/uploads\/2019\/06\/migration-to-magento-2.png\" width=\"100\" height=\"100\" alt=\"migration to magento 2\" class=\"module_image\" title=\"Converting Customer Password Hashes from Wordpress to Magento 2\"><div class=\"module_content_part\"><h3 class=\"title\">Magento 2 Migration<\/h3><p class=\"module_content_text\">Take your online store to the next level with BelVG Magento 2 Migration<\/p><a href=\"https:\/\/belvg.com\/migration-to-magento-2\" class=\"link_2_to_module\" target=\"_blank\" style=\"display:inline-block\" rel=\"noopener\"><span class=\"read-more\">Visit the page<\/span><\/a><\/div><\/div><\/div>\n\n","protected":false},"excerpt":{"rendered":"In some projects developers may face the problem of migrating the data from various other &#8230;","protected":false},"author":82,"featured_media":16536,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"image","meta":{"_acf_changed":false,"footnotes":""},"categories":[474,491,389,564],"tags":[],"class_list":["post-16523","post","type-post","status-publish","format-image","has-post-thumbnail","hentry","category-ecommerce","category-magento-2","category-magento2-development","category-magento-wordpress-integration","post_format-post-format-image"],"acf":[],"aioseo_notices":[],"aioseo_head":"\n\t\t<!-- All in One SEO 5.0.4 - aioseo.com -->\n\t<meta name=\"description\" content=\"Overcoming the problem of migrating the data from various other platforms to Magento 2 on the example of migrating customer password hashes from Wordpress.\" \/>\n\t<meta name=\"robots\" content=\"max-image-preview:large\" \/>\n\t<meta name=\"author\" content=\"Andrey Litvin\"\/>\n\t<link rel=\"canonical\" href=\"https:\/\/belvg.com\/blog\/converting-customer-password-hashes-from-wordpress-to-magento-2.html\" \/>\n\t\t<meta name=\"generator\" content=\"All in One SEO (AIOSEO) 5.0.4\" \/>\n\t\t<script type=\"application\/ld+json\" class=\"aioseo-schema\">\n\t\t\t{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\\\/\\\/belvg.com\\\/blog\\\/converting-customer-password-hashes-from-wordpress-to-magento-2.html#article\",\"name\":\"Convert Customer Password Hashes from Wordpress to Magento | BelVG Blog\",\"headline\":\"Converting Customer Password Hashes from WordPress to Magento 2\",\"author\":{\"@id\":\"https:\\\/\\\/belvg.com\\\/blog\\\/author\\\/andrey-litvin#author\"},\"publisher\":{\"@id\":\"https:\\\/\\\/belvg.com\\\/blog\\\/#organization\"},\"image\":{\"@type\":\"ImageObject\",\"url\":\"https:\\\/\\\/belvg.com\\\/blog\\\/wp-content\\\/uploads\\\/2018\\\/08\\\/Converting_Customer_Password_Hashes.jpg\",\"width\":770,\"height\":433,\"caption\":\"Converting Customer Password Hashes from Wordpress to Magento 2\"},\"datePublished\":\"2018-08-28T14:51:44+02:00\",\"dateModified\":\"2023-11-01T13:58:21+02:00\",\"inLanguage\":\"en-US\",\"commentCount\":4,\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/belvg.com\\\/blog\\\/converting-customer-password-hashes-from-wordpress-to-magento-2.html#webpage\"},\"isPartOf\":{\"@id\":\"https:\\\/\\\/belvg.com\\\/blog\\\/converting-customer-password-hashes-from-wordpress-to-magento-2.html#webpage\"},\"articleSection\":\"ECOMMERCE, Magento 2, Magento 2 Development, Magento WordPress Integration, Image\"},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/belvg.com\\\/blog\\\/converting-customer-password-hashes-from-wordpress-to-magento-2.html#breadcrumblist\",\"itemListElement\":[{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/belvg.com\\\/blog\\\/#listItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\\\/\\\/belvg.com\\\/blog\\\/\",\"nextItem\":{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/belvg.com\\\/blog\\\/category\\\/magento2-development#listItem\",\"name\":\"Magento 2 Development\"}},{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/belvg.com\\\/blog\\\/category\\\/magento2-development#listItem\",\"position\":2,\"name\":\"Magento 2 Development\",\"item\":\"https:\\\/\\\/belvg.com\\\/blog\\\/category\\\/magento2-development\",\"nextItem\":{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/belvg.com\\\/blog\\\/converting-customer-password-hashes-from-wordpress-to-magento-2.html#listItem\",\"name\":\"Converting Customer Password Hashes from WordPress to Magento 2\"},\"previousItem\":{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/belvg.com\\\/blog\\\/#listItem\",\"name\":\"Home\"}},{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/belvg.com\\\/blog\\\/converting-customer-password-hashes-from-wordpress-to-magento-2.html#listItem\",\"position\":3,\"name\":\"Converting Customer Password Hashes from WordPress to Magento 2\",\"previousItem\":{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/belvg.com\\\/blog\\\/category\\\/magento2-development#listItem\",\"name\":\"Magento 2 Development\"}}]},{\"@type\":\"Organization\",\"@id\":\"https:\\\/\\\/belvg.com\\\/blog\\\/#organization\",\"name\":\"BelVG Blog\",\"description\":\"Magento and Prestashop articles\",\"url\":\"https:\\\/\\\/belvg.com\\\/blog\\\/\"},{\"@type\":\"Person\",\"@id\":\"https:\\\/\\\/belvg.com\\\/blog\\\/author\\\/andrey-litvin#author\",\"url\":\"https:\\\/\\\/belvg.com\\\/blog\\\/author\\\/andrey-litvin\",\"name\":\"Andrey Litvin\",\"image\":{\"@type\":\"ImageObject\",\"@id\":\"https:\\\/\\\/belvg.com\\\/blog\\\/converting-customer-password-hashes-from-wordpress-to-magento-2.html#authorImage\",\"url\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/e1a6e3c80cb940fddb65016d94b015cd951b4a8a9cd7227565131f28ea95c7a0?s=96&d=mm&r=g\",\"width\":96,\"height\":96,\"caption\":\"Andrey Litvin\"}},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/belvg.com\\\/blog\\\/converting-customer-password-hashes-from-wordpress-to-magento-2.html#webpage\",\"url\":\"https:\\\/\\\/belvg.com\\\/blog\\\/converting-customer-password-hashes-from-wordpress-to-magento-2.html\",\"name\":\"Convert Customer Password Hashes from Wordpress to Magento | BelVG Blog\",\"description\":\"Overcoming the problem of migrating the data from various other platforms to Magento 2 on the example of migrating customer password hashes from Wordpress.\",\"inLanguage\":\"en-US\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/belvg.com\\\/blog\\\/#website\"},\"breadcrumb\":{\"@id\":\"https:\\\/\\\/belvg.com\\\/blog\\\/converting-customer-password-hashes-from-wordpress-to-magento-2.html#breadcrumblist\"},\"author\":{\"@id\":\"https:\\\/\\\/belvg.com\\\/blog\\\/author\\\/andrey-litvin#author\"},\"creator\":{\"@id\":\"https:\\\/\\\/belvg.com\\\/blog\\\/author\\\/andrey-litvin#author\"},\"image\":{\"@type\":\"ImageObject\",\"url\":\"https:\\\/\\\/belvg.com\\\/blog\\\/wp-content\\\/uploads\\\/2018\\\/08\\\/Converting_Customer_Password_Hashes.jpg\",\"@id\":\"https:\\\/\\\/belvg.com\\\/blog\\\/converting-customer-password-hashes-from-wordpress-to-magento-2.html\\\/#mainImage\",\"width\":770,\"height\":433,\"caption\":\"Converting Customer Password Hashes from Wordpress to Magento 2\"},\"primaryImageOfPage\":{\"@id\":\"https:\\\/\\\/belvg.com\\\/blog\\\/converting-customer-password-hashes-from-wordpress-to-magento-2.html#mainImage\"},\"datePublished\":\"2018-08-28T14:51:44+02:00\",\"dateModified\":\"2023-11-01T13:58:21+02:00\"},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/belvg.com\\\/blog\\\/#website\",\"url\":\"https:\\\/\\\/belvg.com\\\/blog\\\/\",\"name\":\"BelVG Blog\",\"description\":\"Magento and Prestashop articles\",\"inLanguage\":\"en-US\",\"publisher\":{\"@id\":\"https:\\\/\\\/belvg.com\\\/blog\\\/#organization\"}}]}\n\t\t<\/script>\n\t\t<!-- All in One SEO -->\n\n","aioseo_head_json":{"title":"Convert Customer Password Hashes from Wordpress to Magento | BelVG Blog","description":"Overcoming the problem of migrating the data from various other platforms to Magento 2 on the example of migrating customer password hashes from Wordpress.","canonical_url":"https:\/\/belvg.com\/blog\/converting-customer-password-hashes-from-wordpress-to-magento-2.html","robots":"max-image-preview:large","keywords":"","webmasterTools":{"miscellaneous":""},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/belvg.com\/blog\/converting-customer-password-hashes-from-wordpress-to-magento-2.html#article","name":"Convert Customer Password Hashes from Wordpress to Magento | BelVG Blog","headline":"Converting Customer Password Hashes from WordPress to Magento 2","author":{"@id":"https:\/\/belvg.com\/blog\/author\/andrey-litvin#author"},"publisher":{"@id":"https:\/\/belvg.com\/blog\/#organization"},"image":{"@type":"ImageObject","url":"https:\/\/belvg.com\/blog\/wp-content\/uploads\/2018\/08\/Converting_Customer_Password_Hashes.jpg","width":770,"height":433,"caption":"Converting Customer Password Hashes from Wordpress to Magento 2"},"datePublished":"2018-08-28T14:51:44+02:00","dateModified":"2023-11-01T13:58:21+02:00","inLanguage":"en-US","commentCount":4,"mainEntityOfPage":{"@id":"https:\/\/belvg.com\/blog\/converting-customer-password-hashes-from-wordpress-to-magento-2.html#webpage"},"isPartOf":{"@id":"https:\/\/belvg.com\/blog\/converting-customer-password-hashes-from-wordpress-to-magento-2.html#webpage"},"articleSection":"ECOMMERCE, Magento 2, Magento 2 Development, Magento WordPress Integration, Image"},{"@type":"BreadcrumbList","@id":"https:\/\/belvg.com\/blog\/converting-customer-password-hashes-from-wordpress-to-magento-2.html#breadcrumblist","itemListElement":[{"@type":"ListItem","@id":"https:\/\/belvg.com\/blog\/#listItem","position":1,"name":"Home","item":"https:\/\/belvg.com\/blog\/","nextItem":{"@type":"ListItem","@id":"https:\/\/belvg.com\/blog\/category\/magento2-development#listItem","name":"Magento 2 Development"}},{"@type":"ListItem","@id":"https:\/\/belvg.com\/blog\/category\/magento2-development#listItem","position":2,"name":"Magento 2 Development","item":"https:\/\/belvg.com\/blog\/category\/magento2-development","nextItem":{"@type":"ListItem","@id":"https:\/\/belvg.com\/blog\/converting-customer-password-hashes-from-wordpress-to-magento-2.html#listItem","name":"Converting Customer Password Hashes from WordPress to Magento 2"},"previousItem":{"@type":"ListItem","@id":"https:\/\/belvg.com\/blog\/#listItem","name":"Home"}},{"@type":"ListItem","@id":"https:\/\/belvg.com\/blog\/converting-customer-password-hashes-from-wordpress-to-magento-2.html#listItem","position":3,"name":"Converting Customer Password Hashes from WordPress to Magento 2","previousItem":{"@type":"ListItem","@id":"https:\/\/belvg.com\/blog\/category\/magento2-development#listItem","name":"Magento 2 Development"}}]},{"@type":"Organization","@id":"https:\/\/belvg.com\/blog\/#organization","name":"BelVG Blog","description":"Magento and Prestashop articles","url":"https:\/\/belvg.com\/blog\/"},{"@type":"Person","@id":"https:\/\/belvg.com\/blog\/author\/andrey-litvin#author","url":"https:\/\/belvg.com\/blog\/author\/andrey-litvin","name":"Andrey Litvin","image":{"@type":"ImageObject","@id":"https:\/\/belvg.com\/blog\/converting-customer-password-hashes-from-wordpress-to-magento-2.html#authorImage","url":"https:\/\/secure.gravatar.com\/avatar\/e1a6e3c80cb940fddb65016d94b015cd951b4a8a9cd7227565131f28ea95c7a0?s=96&d=mm&r=g","width":96,"height":96,"caption":"Andrey Litvin"}},{"@type":"WebPage","@id":"https:\/\/belvg.com\/blog\/converting-customer-password-hashes-from-wordpress-to-magento-2.html#webpage","url":"https:\/\/belvg.com\/blog\/converting-customer-password-hashes-from-wordpress-to-magento-2.html","name":"Convert Customer Password Hashes from Wordpress to Magento | BelVG Blog","description":"Overcoming the problem of migrating the data from various other platforms to Magento 2 on the example of migrating customer password hashes from Wordpress.","inLanguage":"en-US","isPartOf":{"@id":"https:\/\/belvg.com\/blog\/#website"},"breadcrumb":{"@id":"https:\/\/belvg.com\/blog\/converting-customer-password-hashes-from-wordpress-to-magento-2.html#breadcrumblist"},"author":{"@id":"https:\/\/belvg.com\/blog\/author\/andrey-litvin#author"},"creator":{"@id":"https:\/\/belvg.com\/blog\/author\/andrey-litvin#author"},"image":{"@type":"ImageObject","url":"https:\/\/belvg.com\/blog\/wp-content\/uploads\/2018\/08\/Converting_Customer_Password_Hashes.jpg","@id":"https:\/\/belvg.com\/blog\/converting-customer-password-hashes-from-wordpress-to-magento-2.html\/#mainImage","width":770,"height":433,"caption":"Converting Customer Password Hashes from Wordpress to Magento 2"},"primaryImageOfPage":{"@id":"https:\/\/belvg.com\/blog\/converting-customer-password-hashes-from-wordpress-to-magento-2.html#mainImage"},"datePublished":"2018-08-28T14:51:44+02:00","dateModified":"2023-11-01T13:58:21+02:00"},{"@type":"WebSite","@id":"https:\/\/belvg.com\/blog\/#website","url":"https:\/\/belvg.com\/blog\/","name":"BelVG Blog","description":"Magento and Prestashop articles","inLanguage":"en-US","publisher":{"@id":"https:\/\/belvg.com\/blog\/#organization"}}]}},"aioseo_meta_data":{"post_id":"16523","title":"Convert Customer Password Hashes from Wordpress to Magento | #site_title","description":"Overcoming the problem of migrating the data from various other platforms to Magento 2 on the example of migrating customer password hashes from Wordpress.","keywords":null,"keyphrases":null,"focus_keyword":null,"additional_keywords":null,"truseo_locale":null,"primary_term":null,"canonical_url":null,"og_title":null,"og_description":null,"og_object_type":"default","og_image_type":"default","og_image_custom_url":null,"og_image_custom_fields":null,"og_image_url":null,"og_image_width":null,"og_image_height":null,"og_video":null,"og_custom_url":null,"og_article_section":null,"og_article_tags":null,"twitter_use_og":false,"twitter_card":"default","twitter_image_type":"default","twitter_image_custom_url":null,"twitter_image_custom_fields":null,"twitter_image_url":null,"twitter_title":null,"twitter_description":null,"schema_type":"default","schema_type_options":null,"schema":{"blockGraphs":[],"customGraphs":[],"default":{"data":{"Article":[],"Course":[],"Dataset":[],"FAQPage":[],"Movie":[],"Person":[],"Product":[],"ProductReview":[],"Car":[],"Recipe":[],"Service":[],"SoftwareApplication":[],"WebPage":[]},"graphName":"","isEnabled":true},"graphs":[]},"pillar_content":false,"robots_default":true,"robots_noindex":false,"robots_noarchive":false,"robots_nosnippet":false,"robots_nofollow":false,"robots_noimageindex":false,"robots_noodp":false,"robots_notranslate":false,"robots_max_snippet":null,"robots_max_videopreview":null,"robots_max_imagepreview":"large","priority":null,"frequency":null,"local_seo":null,"limit_modified_date":false,"ai":null,"breadcrumb_settings":null,"seo_analyzer_scan_date":null,"created":"2026-11-03 18:37:05","updated":"2026-11-03 18:37:05"},"aioseo_breadcrumb":"<div class=\"aioseo-breadcrumbs\"><span class=\"aioseo-breadcrumb\">\n\t\t\t<a href=\"https:\/\/belvg.com\/blog\/\" title=\"Home\">Home<\/a>\n\t\t<\/span><span class=\"aioseo-breadcrumb-separator\">\u00bb<\/span><span class=\"aioseo-breadcrumb\">\n\t\t\t<a href=\"https:\/\/belvg.com\/blog\/category\/magento2-development\" title=\"Magento 2 Development\">Magento 2 Development<\/a>\n\t\t<\/span><span class=\"aioseo-breadcrumb-separator\">\u00bb<\/span><span class=\"aioseo-breadcrumb\">\n\t\t\tConverting Customer Password Hashes from WordPress to Magento 2\n\t\t<\/span><\/div>","aioseo_breadcrumb_json":[{"label":"Home","link":"https:\/\/belvg.com\/blog\/"},{"label":"Magento 2 Development","link":"https:\/\/belvg.com\/blog\/category\/magento2-development"},{"label":"Converting Customer Password Hashes from WordPress to Magento 2","link":"https:\/\/belvg.com\/blog\/converting-customer-password-hashes-from-wordpress-to-magento-2.html"}],"post_mailing_queue_ids":[],"_links":{"self":[{"href":"https:\/\/belvg.com\/blog\/wp-json\/wp\/v2\/posts\/16523","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/belvg.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/belvg.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/belvg.com\/blog\/wp-json\/wp\/v2\/users\/82"}],"replies":[{"embeddable":true,"href":"https:\/\/belvg.com\/blog\/wp-json\/wp\/v2\/comments?post=16523"}],"version-history":[{"count":3,"href":"https:\/\/belvg.com\/blog\/wp-json\/wp\/v2\/posts\/16523\/revisions"}],"predecessor-version":[{"id":27765,"href":"https:\/\/belvg.com\/blog\/wp-json\/wp\/v2\/posts\/16523\/revisions\/27765"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/belvg.com\/blog\/wp-json\/wp\/v2\/media\/16536"}],"wp:attachment":[{"href":"https:\/\/belvg.com\/blog\/wp-json\/wp\/v2\/media?parent=16523"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/belvg.com\/blog\/wp-json\/wp\/v2\/categories?post=16523"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/belvg.com\/blog\/wp-json\/wp\/v2\/tags?post=16523"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}