How do I change my WordPress password if I have lost access to the admin?

It's a little tricky, but you can change it directly in the database through Cpanel.

Here are the steps:

  1. Click phpMyAdmin within Cpanel.
  2. Select the database of your WordPress install.
  3. Find the wp_users table and click Browse.
  4. Click Edit next to the row for your admin user.
  5. Replace the password with the hashed value of your new password (see below) and click Save.

How to generate a new password hash

You need to enter the hashed value of your password into the databse, not the original password. To get the hashed value, use a MD5 hashing tool like Just put your password you want to use in the box and hit Generate.

For exmple, if you entered 'abcdef', it will show you something like:

Your Hash: e80b5017098950fc58aad83c8c14978e

Your String: abcdef

So in this example, if your password was "abcdef", you would enter the hashed value "e80b5017098950fc58aad83c8c14978e" into your database row above. (But please use a harder password than "abcdef"!).

Some background info on passwords and hashes

WordPress doesn't store your password in the database in plain text. Instead, it stores an encrypted version of it. When you create an encrypted version of a string of letters or numbers, that is called a "hash" of that string. A tool that creates a hash out of a string of letters is called a "hashing algorithm". There are several types of hashing algorithms. WordPress uses one called MD5.

When you type your password into the login box, WordPress encrypts whatever you type in, and then compares that hash to the hash it has in its database. This cannot be done in reverse--you cannot figure out the original password if you only have the hash. This means that if your database was somehow compromised, nobody would know your actual password. 

Comments (0)
Help Desk Software by Kayako Resolve