reset wordpress password

The password, referred to by some as a “passcode,” is the key in the digital world. What defines a secure password depends on who you ask. Eight characters or more, a combination of upper case and lower, numbers and special characters are a few you’ve encountered.

If you ask some people, they will admit to using the same password for every login. Others are more paranoid and keep each set of credentials unique. Whatever the case, we all have encountered the same error one point in time: the startling, “Incorrect Password.”

Resetting your WordPress password with the “Lost your password?” link

The first line in password resetting is the ever-present I forgot my password link. Unless you have a custom login, you access your website’s WordPress dashboard at /wp-admin or /wp-login.php. Below the login box is a link, “Lost your password?”

WordPress “Lost your password?”

Click it and you will be presented with the option to reset the password. In this scenario you will need to know the username or password for the account. A reset password link is emailed.

Resetting your WordPress password in phpMyAdmin

phpMyAdmin is a very commonly used software that allows end-users to manipulate their databases in a web browser. Besides allowing you to update your site’s URL manually and fix many website infections, phpMyAdmin will also allow you to rehash your WordPress password. WordPress always encrypts your password so you will never be able to reveal the existing password.

Open up phpMyAdmin, and click on the database name in the left panel. This will expand all tables in the database. Specifically, you are looking for a table that ends with the word ‘users’.

phpMyAdmin > select users table > click Edit next to row 1

Click on this ‘users’ table on the left to open it’s rows in the right window. The user on line 1 will be the default administrative account. Click the ‘Edit’ link to the left side of row one.

Type in new password, select MD5 from Function, scroll down and click Go

About 3 rows down you will have your Password field. What is currently in there will look like nothing you’ve ever set your password to before in a textbox to the right. That is your password hashed as an MD5. Delete it’s entire contents, and enter in the password you would like to set it to. To the left side of this textbox will be a dropbox list. Select MD5 from this list (it should be alphabetical order). Finally, scroll down to the bottom of the page and click on one of the ‘Go’ buttons.

That’s it. When the page reloads you will notice a newly hashed password appears. You can now login with your new password.

Resetting your WordPress password in SSH (Command Line Interface)

In the case that you do not have phpMyAdmin access and the “Lost your password?” link doesn’t work, one of your last hopes is to login to the back-end server itself to make these changes. These instructions only apply to Linux web servers with SSH access and MySQL installed. Replace italicized text with corresponding data.

First, connect to your server via SSH as an authorized users.

ssh user@yourserversaddress 

Next, connect to your MySQL server:

mysql -h hostname -u username -p databasename

Select the database that correlates to your website:

use databasename

Find the ‘users’ table with the following command:

show tables;

Finally, use this command to change the WordPress website’s admin password:

UPDATE tablename SET user_pass = MD5('Y0urN3wP4$sW@rD') WHERE ID = 1;

Finished! Now you are able to login to your WordPress administrative dashboard.

Comments are closed