How to get WordPress username and password from database

We teach you how to find the WordPress username and easily change the password for that user, using phpmyadmin. the easiest way to edit the WordPress database.
Share on facebook
Share on twitter
Share on linkedin
Share on pinterest

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.

Method 1

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. 

“https://yourdomainshouldreplacethesewords.com/?author=1”

one way to find a WordPress Admin username for a site, is by typing the query '?author=1 " after the domain name. For instance, actuallynatural.com/?author=1 will result in the Admin username showing up.

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. 

Want to build your own WordPress website?  I created an ultimate step-by-step tutorial on how to build your next WordPress site with Elementor.

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.   

to edit the wordpress password and find username, click on phpmyadmin inside of cpanel under the databases section

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.  

Get wordpress username and password from the database, first click on Show More, and then you will find the Database details to login with Managed WordPress to phpmyadmin

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.

find your wordpress username and password inside the database in phpmyadmin

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‘.

Find the wp_users table inside of your database by clicking on the database name on the top left, and then on the new screen, select the browse tab on the top left of the users table itself. This will allow you to edit the password, email, etc.

Now, click ‘Edit‘ for your user.  The Edit button allows you to view/edit both the username (the WordPress Admin login), and the password.  

In phpmyadmin, in the users table, edit the existing user, here you will find the username which is your login, and the ability to edit the password. Dont forget to use MD5 encryption when editing the password, or it wont work.

‘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.  

Once you found your username in phpmyadmin for your WordPress Admin user, edit the Password and make sure you select MD5 encryption, type your password carefully, you only get one chance. Hit Go on the bottom right, and you have saved your new password.

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!

More Great Reading

Scroll to Top

gain access to Premium Content

Best Things In Life Are Free

Free Download: Our Ultimate Do-It-Yourself SEO Guide!

 Receive of latest SEO tips straight to your mailbox