Creating passwords for new users directly in the DB

Hi all,

I would like to create new users directly in the DB with DataGrip, but I’m facing a problem with the passwords since they are not saved as is in the DB ( in the wp_users table in the user_pass field). I’ve googled to find out how exactly the transformation works, without success.
If this is only password + hash through an algorithm, like it is shown here:

then where are the salts in the dev environment coming from? In the ansible vault for development there are no salts.

Can someone please enlighten me?

What about using the WP CLI for programmatically setting passwords?


Then WordPress will take care of all the hashing and implementation details.

Thanks @strarsis.
I didn’t try this way, but I found an online generator:
WordPress Password Hasher
which works for Bedrock/Trellis.
I’ve tried with some libraries in Node.js but they didn’t work supposedly because of different versions. Same with Local by Flywheel where I’ve noticed that the passwords differ in the first 4-5 symbols.

This topic was automatically closed after 42 days. New replies are no longer allowed.