Force Resetting WordPress Password & Login Username – Cpanel Way

Often we get across certain situations where we need to change the WordPress default login username but WordPress dashboard options never allow you to change the default username with the following quotation:

Usernames cannot be changed.

This gets really frustrating when you need to change this username to something better but you can’t do it, and it gets even more frustrating when you start thinking to create another account to get another username. In the same case often we forget the password of WordPress blog which now a days is always tried to be kept as strong as we can! but in that case we always need to reset that using our email address. Worst case comes when we have forgotten that which email address was used with this WordPress installation, Specially when you are a Web-Developer and you handle a lot of WordPress sites. Don’t worry here is a smart way using cpanel of your hosting account; to reset your WordPress password along with username.

Changing Your WordPress Login Username and Password using Hosting Cpanel:

1- For this just login into the hosting account of your site and go to Cpanel.

2- Get to the PhpMyAdmin and there if it prompts for password as in case of some hosting providers it does, Just provide the same password of your Cpanel.

3- There select the data base of the required WordPress Blog. (Database names are given at the top left side of your screen below the information_schema. Just click on the required database which you have used with WordPress¬† If you don’t know the name of database then check the “wp-config.php” file to get the name of required database.)

PhpMyAdmin WordPress database


4- After that open the “wp_users in the edit mode. Or else you can also click the Browse button under the Action Menu list as shown in picture. In most of latest versions of PhpMyAdmin when you click on any table it automatically opens in edit mode.

There you will see your username of the login area as well as password encrypted in md5.

Some Word on Md5: The MD5 Message-Digest Algorithm is a widely used cryptographic hash function that produces a 128-bit (16-byte) hash value. Specified in RFC 1321, MD5 has been utilized in a wide variety of security applications, and is also commonly used to check data integrity. MD5 was designed by Ron Rivest in 1991 to replace an earlier hash function, MD4. An MD5 hash is typically expressed as a hexadecimal number, 32 digits long. [Source]

5- After that click on the small pencil (Means for editing the required Row, or if pencil not shown as sown in below screen shot, tick the tick box and in actions hit edit,or else try to find edit action for the required row)

md5 password WordPress

6- Now, you’ll be in the edit section of the specific username row, there you can edit your md5 password of WordPress login as well as the login username which is in simple text form. To change the password you’ll need a md5 generator; go here md5 Generator type your required password in “Type the String” in text form and hit “Calculate Md5” below copy the md5 code in green color and paste that in the “user_pass” section. To change the username simply change the old “user_login” to new-one and click “update button” or “Go button” at the end of screen. For further reference see the screen shot:

Edit users table in MySQL wordpress

7- That’s it, Head to www.yoursite.com/wp-admin and then login with new details. Don’t forget to follow the below instructions:

After you are into your WordPress dashboard you need to re-change your WordPress password so that WordPress may overwrite our weak generated md5 encrypted password into it’s own powerful md5 generated password. For this go to users>your account and then edit the password to the same one as you have entered in the MySQL (PhpMyAdmin) area of your WordPress blog i-e the one you generated with my guide.