Subscribe

Resetting a WordPress admin password

โœ๏ธ

Ever lost your WordPress password? Here is a way to reset it.

6 Oct, 2020 ยท 1 min read

I'm not particularly eager to work on WordPress, but sometimes you inherit legacy code or have to support a client.

The worst thing is where you get access to the database, but nobody knows the login anymore.

So how do we go about changing the admin's password?

Pre: You must have access to the database!

Using phpMyAdmin to change the WordPress password

The first thing we need to do is log in to phpMyAdmin and find our database.

Then we need to open up the wp_users (wp can be underscored by something unique for your install).

PhpMyAdmin for WordPress install

We need to click the edit button on the admin record.

In the password field, add the new password in a readable way and choose MD5 as the Function.

Reset WordPress password

Please don't use passwords like this example above

Now you can click save, and we will be able to log in with our new password!

Thank you for reading, and let's connect!

Thank you for reading my blog. Feel free to subscribe to my email newsletter and connect on Facebook or Twitter

Spread the knowledge with fellow developers on Twitter
Tweet this tip
Powered by Webmentions - Learn more

Read next ๐Ÿ“–

Develop a local WordPress theme using Docker

11 Oct, 2021 ยท 2 min read

Develop a local WordPress theme using Docker

Retrieving the primary WordPress menu in Next.js

27 Sep, 2021 ยท 5 min read

Retrieving the primary WordPress menu in Next.js

Join 1372 devs and subscribe to my newsletter