How To Find WordPress Password (All Possible Ways)

reset wordpress password

How can I find my WordPress password?

When using multiple websites, or by changing the password monthly, it could happen that we tend to lose our pass. There are a few ways to retrieve or to find my wordpress password. In this article we’ll talk about the different possibilities to find wp-pass.

We can use either FTP, MySQL, DirectAdmin or Cpanel through PHPmyAdmin.

The first option I don’t like to use, because it is more work to change the password after that. The easier way is to find the wp-pass in database. And change it to “00000000” or to “xxxxxxxxx”. To than log in to wordpress and directly change it again to something you write down. So in future we will not forget.

When we don’t have access to the database, the only options we have is to change the pass trough FTP, or to ask WordPress to send an email where they offer a link to change the pass. In my experience, that e-mail can take 48 hours to arrive. So if we lost our pass we want to get access to our site directly. And we do not wish to wait for 2 days.

By using FTP

When we are using FTP to recover the wordpress password, we need first to login trough filezilla or another FTP program that we are using.

The next thing we have to do is to go to the WordPress directory. From there on we chose wp-content and go to themes. There is one file in particular that we need. The file is called functions.php.

We download the file to a directory on our computer and we need to add just one line of code in that php file.

From the moment we see ‘<?php‘ right after that line we are going to add wp_set_password(‘password’,1);

Don’t forget using the” ;” at the end.

What this little piece of code will do is reset the password. Number 1 stands for ID 1. ID 1 is the admin of the website. If you are not admin on that particular website its recommended to ask the admin for help. So I suggest you are the administrator.

We save the functions.php file and reupload it to the directory where it belongs.

We can now go to our WordPress login page by using our login name and by using the wp-pass password.

When we typed in our login and pass we will see that the page will be refreshed. That means we have to login again. BUT there is one thing we need to do before that!

We need to remove that line of code that we just added to our functions.php file. If we do not do this, each time our wp-pass will be reset and that’s not what we want.

So we delete this line of code in our functions.php  and reupload it again.

Now we can login by using our login and by using the wp-pass password.

After that we can change in our WordPress dashboard, the wp-pass to a more complex one.

I suggest using something like this = *df$$@DF856fGplEmdZ%F

That’s how we recover the wordpress password trough FTP and how we eventually reset the wordpress password trough FTP!

(Don’t forget to write the password down somewhere safe!)


Using PhpMyAdmin

In order to reset the wp password using PhpMyAdmin we need to be able to connect to our Cpanel or DirectAdmin panel. There we can chose to open PhpMyAdmin. This will give direct access to the database.

If we are using Cpanel or DirectAdmin, the principal stays the same. So we can reset the wordpress password using Cpanel or reset the wordpress password using DirectAdmin using the same method displayed below.

The next thing we need to know, is the name of the database. If we only have one website, this will be an easy task. If we have multiple websites we must be sure to select the right database.

If we are not sure which database we need to select. We can check in our wordpress files for the file wp-config.php.

In that file we will see a line: define(‘DB_NAME’, ‘YOUR_DATABASE_NAME’);

We select the correct database and go to the table wp_users.

There we will see all the users who are registered to our website.

In order to reset the wp-pass we need to edit the password displayed in the table’s column. The password will be encrypted using MD5 hash. So the password we will see there is an encrypted version of the password. It is not the correct password.

We can delete that line and type a new password instead. Right after we did that, we need to select MD5 from the function’s drop down menu next to the password. Our wp-pass will now be stored as an encrypted MD5 wp-pass.

Click the SAVE or GO button and we have reset our wordpress password using PhpMyAdmin!

(Don’t forget to write the password down somewhere safe!)

Using MySQL

It’s more common and more easier to reset wordpress password through PhpMyAdmin. But if you prefer to use MySQL here is what you have to do…

We need to login to PhpMyAdmin and chose the right database. Further we need to go to SQL or MySQL

In the MySQL Command we type

UPDATE wp_users SET user_pass = MD5(‘MyNewPassword’) WHERE ID=1 LIMIT 1;

Our new wp-pass will now be MyNewPassword!

It is recommended to use a more complex password like we discussed above. Some signs cannot be used using MySQL. Therefore I suggest using PhpMyAdmin method instead. If not we can use a more simple password. We can login to our website and change the password to a more complex one in the WordPress dashboard.


Make sure to write down the WP-pass on a note or on a USB drive. Use not only capital letters and other letters but use also numbers and signs.


The best length is using around 12 signs or more.

Share this with your friends

Be the first to comment on "How To Find WordPress Password (All Possible Ways)"

Leave a comment

Your email address will not be published.