The other day we had to reset the admin password for a client’s WordPress website. This can be easily done from phpMyAdmin.
Every WordPress website uses a so called MySQL Database which can be accessed and managed through phpMyAdmin. Once you’re in phpMyAdmin select the database for the WordPress install. In our example we’ll assume it’s the ‘goodwebsites’ database.
Look for a table wp_users and select it.
The default prefix is wp_. However, for security reasons it’s better to use a different prefix. So if the prefix was something like gwntts122_ then the user table entry to look for would be gwntts122_users.
Once the table is loaded, look for the username whose password you’ll need to reset. Let’s assume is the unsafe default username – admin (always! Always! ALWAYS! Change the default admin username).
Click on the edit link (pencil icon).
Look for the row named user_pass (normally the 3rd one).
You will notice that there are a lot of random characters in the Value (password) field. Due to security reasons, WordPress stores the passwords encrypted as MD5 Hash rather than Plain text.
To reset the password we make the following changes:
- Select MD5 from the Function field dropdown – this will encrypt your password
- Enter your new password in the Value field
- Click on the Go button to save you’re new password
Now you have successfully changed your WordPress password to mynewpassword.