Changing username and password

Issue Summary

Hello guys, I have a few test websites on Flywheel and decided to add a new one (ctrl+ N), it asked me for WP username and password, I used the same default letters (root) now I want to change them, how can I do that? Imagine later I want to migrate this to a hosting website, so I need to make sure the WP username and password are unique.

This isn’t something you’d do directly with Local, and is more of a WordPress question, so I moved it to the “WordPress Questions” category.

Basically, you’ll want to change the user settings within WordPress. This blog post goes into a few different options:

The above post mentions PHPMyAdmin. Local has Adminer which is pretty similar, and can be opened using the link in the “Database” tab.

Another option is to manage WordPress’ users with wpcli:

In particular the create and update subcommands might be useful!

Thank you. I went to user section on WP (WordPress) and I realized even though the user pass on the database tab on LOCAL is root, on WP is something else.
I tried to learn also how to change the user and password directly on the database. So I clicked on the database tab on LOCAL and then ADMINER. I went to the database webpage and I selected wp_users, then I pressed EDIT the username is the same as the WP username section on WP but the password is different! I changed the password on WP (password, set a new password) and I logged in using that user and pass to make sure they are correct. How come the database password on Adminer is different from the real WP password?! I noticed on adminer page> wp-users > user-pass has two columns, one is a blank column, if you click there you will see tags like md5 sha1 password etc. I do not know if any of those should be selected.
Thank you.

The password you see directly in the database isn’t the actual password. This is for security reasons so that if anyone gets an export of your site, they don’t suddenly have a list of all your users’ passwords.

The strings you are seeing the DB are basically a hash of the password. This means that whenever you log into a WP site, WordPress takes your password, hashes it, and then compares the result to what it has saved in the DB.

If you’re curious to know more about the practice of hashing passwords when saving them to the database, I think this question on StackOverflow is a good one:

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.