Skip to content

What to do When You Forget Your WP-Admin Password

cande, March 14, 2026March 18, 2026

Even in the age of password managers, I’m still horrible about not saving things correctly (or forgetting key bits of information relevant to logins). So if you ever find yourself locked out of your wordpress.org blog, here’s 3 ways you can get back in.

1 – If you have a separate admin and user account (recommended setup):

To change your password in current versions:

  1. In the Administration Screen, menu, go to Users > All Users.
  2. Click on your username in the list to edit it.
  3. In the Edit User screen, scroll down to the New Password section and click the Generate Password button.
  4. If you want to change the automatically generated password, you can overwrite it by typing a new password in the box provided. The strength box will show you how good (strong) your password is.
  5. Click the Update User button.

Your new password becomes active immediately.

Passwords – the bane of my existence

2 – Use password reset feature:

At the login screen, typically yourblog.com/wp-admin, enter username or email and click ‘reset password’

If you’re unlucky like me, your inbox will destroy any emails sent and this wont work. Hopefully this doesn’t happen for you, because it’s the easiest and most straightforward method.

3 – Log into your wp back-end and manually update the mysql database:

Create a MD5 hash of your new password. Here’s a link to a simple web based one: https://www.miraclesalad.com/webtools/md5.php OR on Unix/Linux:

  • Create file called new-wp.txt with ONLY the new password in it.
  • echo -n ‘your_password_here’ | md5sum (-n removes new-line)
  • save that string somewhere for later

Connect to your droplet/lightsail/ec2/etc (instance)

  • mysql -u root -p // (and enter your mysql password. if you don’t know this, you should be able to find it in root/ do an ls -al and look for .digital-ocean_password or similar)
  • LIST DATABASES;
  • USE (name of database, probably “wordpress”);
  • SHOW TABLES; // looking for one with “users”
  • SELECT ID, user_login, user_pass FROM (name of table);// This shows us information about users, including user ID and name
  • UPDATE (name of table) SET user_pass="(md5 string)" WHERE ID = (relevant user ID); this changes password
  • (type Control-D to exit mysql client)

Hopefully one of these helped! Drop a comment with other methods or stories of when you got locked out of an application.

Tips&Tricks mysqlwordpress

Post navigation

Previous post
Next post

Leave a Reply Cancel reply

Your email address will not be published. Required fields are marked *

About

Cande is a pentester located in the US who loves dogs, a good chai, and reading her neighbor's emails.

Find Me | @linkedin | @x

Recent Posts

  • Cheat Sheet Series: Ffuf
  • What to do When You Forget Your WP-Admin Password
  • HackTheBox Academy – Web Fuzzing
  • ZeroToGhost.com

Archives

  • March 2026
  • January 2026

Categories

  • Cheat Sheets
  • HTB Academy
  • Other
  • Tips&Tricks
©2026 | WordPress Theme by SuperbThemes