How to get WordPress username and password from database
Have you ever been locked out of your WordPress account?
Perhaps you are locked out of WordPress, you think you know your username, but you don’t know what your password is. The only error you keep getting is ‘invalid username/password’.
Don’t worry, this fix is easy – and I will show you how to fix it!
In this article, I demonstrate how to get WordPress username and password from the database, using phpmyadmin. Just start reading at method 1.
However, if you are locked out of your WordPress account because the Database is missing data. Or if someone deleted all WordPress users.
You will need a different type of help. I created this article titled ‘creating a WordPress user from scratch’. and I suggest you read it.
First, there are a couple ways to find your WordPress username. The easiest is to type a query into the browser, after your site.
If I wanted to query ‘show me this website with all authors equal to admin’, I would type out ” /?author=1 ” after the domain.com.
Try it yourself, with your website.
For instance, https://actuallynatural.com/?author=1. This will show you the sites ADMIN user, all posts created by that admin, as well as the Admin username in the URL.
Look above, you can see the URL is now https://actuallynatural.com/author/openspark. The WordPress Admin username is openspark.
This is the easist way to get the Admin username for a WordPress site.
Because there are ways to prevent people from seeing this, as this is considered a security risk, this won’t always work. In fact, it’s best if you fix any users ability to find your username, explained by this article, hackers can steal your WordPress credentials‘.
If this didn’t work for you, try method 2 below.
Method 2 - Find WordPress username in the database
Phpmyadmin can be pretty intimidating to people. That is why we will show you exactly what to look for, what to click on, and how to navigate.
First, login to your hosting and find phpmyadmin. Using cPanel hosting? The database is located under the Database section, where you will find a phpmyadmin button.
Find your database
For those of you using Managed WordPress, you will find this under the Settings tab, and under production site – click Show More.
Interested in Managed WordPress hosting? Check out our latest offers, as low as $7.99/mo!
Once you click Show More, you will find Database, and phpmyadmin. Click view to the right.
Clicking View will bring up a box that shows your phpmyadmin URL, click this and open it in a new window. Go back a tab, and copy the username, and password, and paste it into the required fields. This logs you into phpmyadmin on Managed WordPress.
Once inside of phpmyadmin, you will see your database name on the top left. You will need to click on the database name to get WordPress username and password from the database. When you click on the link of your database name, your screen should look like below.
On the lefthand side, inside of the column, find the wp_users table.
*Note* – Depending on what your WordPress table prefix is, you might not see wp_users. You might see wp_0ataxhy5a5_users.
Click whatever version is your wp_users.
Now, click ‘BROWSE‘.
Now, click ‘Edit‘ for your user. The Edit button allows you to view/edit both the username (the WordPress Admin login), and the password.
‘user_login’ – this is your WordPress username that you are looking for. It will be listed under ‘value’ to the right.
Once you found your WordPress username in the database, it’s time to change the password.
Look at the user_pass row. This is your Password. It will be unrecognizeable under ‘value‘. Because this value is MD5 encrypted.
To change the password into one that you will know, erase the content under the value column, and replace with a password of your choice. You only have this one chance, so make sure it is correct. After you enter it, select MD5 under the function column.
IMPORTANT! – You need to make 100% sure you selected the value MD5 under the ‘function’ column. Without this, your password will never work.
Now click GO on the bottom right, this will save your work, and you are finished!
Easy as that! You can now login to your WordPress site like normal.
If you enjoyed this help article, feel free to check out our other WordPress Help articles too!