How to import WordPress Users as JSON to auth0

Hi @daniel10 - Welcome to Auth0 community!

The easiest way to migrate Wordpress users would be to use the custom DB option, but yes, you can use the bulk-import option as well and from what I am seeing in our documentation, you should now (as of July 2020), be able to upload hashed passwords as well - “Auth0 now supports importing hashed passwords by specifying a custom password hash in the import schema. The Import & Export Users documentation contains details on how to format password hashes for import. The bulk importer supports several standard common hashing algorithms.” - See: https://auth0.com/blog/technical-strategies-for-migrating-users-to-auth0/

During the bulk import process, you can update the custom_password_hash if the user did not login using the initially imported custom_password_hash . For example, you can submit the below JSON twice to the /api/v2/jobs/users-imports endpoint with different values for custom_password_hash . On the second submit, send the upsert flag to true .

[ { "user_id": "2000", "email": "[examplecouser20@gmail.com](mailto:examplecouser20@gmail.com)", "given_name": "ExampleCo User", "name" : "ExampleCoUser20", "custom_password_hash": { "algorithm": "bcrypt", "hash": { "value": "$2a$10$aHF7mbpWT6tZ7PJVtwtjNelaKbszikcYBCB2jibvbFcGFmOsu/s4K" } } } ]

You can use this link to generate bcrypt password hashes: Bcrypt Encrypt - Bcrypt Hash Generator - Online - Browserling Web Developer Tools.

Also, to address you concern - AFAIK, Wordpress user migration doesn’t require an Enterprise plan - where did you see this?

Hope this helps. Please let me know if you have any other questions.

1 Like