Forgot admin password

Hi I installed a local site and now I can’t remember the password. How can I add another admin or reset my password using the database?

Thank you

Sirus

Hi Sirus,

To recover your WordPress password in Local, the easiest thing is to:

  1. Go to the WordPress login page
  2. Click on “Forgot Password?” and fill out the form
  3. Go back to the site in Local
  4. Go to Utilities
  5. Click on MailHog (or MailCatcher) and view the password reset e-mail in there
4 Likes

Hi Clay,

I’ve followed the steps above but step 5. is impossible to complete…

Absolutely nothing happens when I click on MailHog.

Please simple add a can’t login section to the FAQs.

Such a simple task, but so frigging frustrating when you can’t login!

URRGGGGHHHH!

@RMAgency,

Are you using Local on a Mac or PC?

Also, you can change user passwords using WP-CLI. You can use WP-CLI by right-clicking on the site in Local and then going to “Open Site SSH”

Here’s an example command to change a user’s password with WP-CLI: https://developer.wordpress.org/cli/commands/user/update/#examples

Hi Clay,

Thanks for your reply.

I’m using a Mac and have just downloaded the latest version of Local.

Local worked fine last time I used it.

I checked the link but I’m none the wiser on what I actually need to do.

It really shouldn’t be this painful to simply login!

Can you reset do anything your end to resolve this issue?

Thanks,

There’s nothing we can do due to the nature of how Local works.


What is your default browser set to?

Also, can you try clicking on the MailHog link and then send your local-by-flywheel.log file? You can find it by going to Help » Reveal Local’s Log.

I’ve tried everything.

Getting nowhere… :frowning:

Shall I simply delete the site and start over?

Here’s how you can reset the password with WP-CLI:

  1. Right-click on the site in Local’s sidebar
  2. Click on “Open Site SSH”
  3. Enter wp user update USERNAME --user_pass=NEWPASSWORD … After the command is entered in Terminal, press Enter

USERNAME can also be the user’s e-mail or numeric ID.

Then, try logging in again.

Terminal is way over my head. I don’t want to mess around with that.

All I need to know is what is the email or user name for the local site? I named the site Pizza Verde and gave it a new password which I’ve tried to login with… But the user/email fails I believe.

Hah I’m in!

Please add a button to the Local dashboard that allows the user to check their username!

1 Like

That was way more painful than it ever should have been.

Your best bet is to use WP-CLI to get the list of the users. Here’s an example with the output. Beyond this, I’m not sure how to help since it’s a local site.

Note, in the screenshot below all I typed in was wp user list and then wp user update admin --user_pass=password123.

Glad to hear! How’d you end up getting in?

We’re going to be looking into theme/plugin/user management down the road.

So, I’m used to resetting the password in my databaase using PHPAdmin. I tried the same thing using Adminer in my Local site, and the changed password didn’t seem to “stick.” That is, I’d change it, try to log in, it wouldn’t work, and I’d go back to Adminer and the old password was still there. How come this didn’t work? I clicked “save” at all the right times, I think… Very puzzled but also brand new to Local.