WordPress password reset via database

May 23, 2016

How to reset your forgotten WordPress password via the database.

It happens to us all at some point. The fact that we all have to remember so many usernames and passwords we forget our login details to get in to the WordPress admin.

Providing that you can remember your username or email address you can just click on the forgot password link at yourdomain/wp-admin and WordPress will send you a password.

If for any reason you don’t have access to that email address, then it cannot send the details to you. But don’t worry there is an answer.

  1. Go to your file manager in cpanel and navigate to your public_html folder for the domain, if its a addon domain you need to navigate down to the folder for the domain.
  2. Locate the wp-config.php
  3. Right click and edit–> edit
  4. Towards the top of the file you will see database name, take a note of it.

Now go back to cPanel

  1. Backup your current database in cPanel in the backups section and download.
  2. Select phpMyAdmin
  3. Once in phpMyAdmin select the database name you have taken a not of (if you have more than one)
  4. Click on wp_users unless you have another prefix xx_users
  5. Select User ID 1 and click edit.

On the row where it states user_pass do the following:-

  1. In the function drop down box next to user_pass select MD5
  2. In the value box on the same line remove the current encrypted password and type in a new one.
  3. Here you can also take a note of the user login as well if forgotten
  4. Click Go at the bottom right of the table to save.

Thats it your password has changed, you can login to the yoursite/wp-admin with the new password. Do not change the username or anything else here or it will break your database, for any other changes like email address and display name login and change there.

Databases are very fragile things and changing the wrong thing or not following the instructions to the letter will result in a broken site, hence the recommendation to backup before you start.

If you have any questions please don’t hesitate to get in touch

Reset WordPress Admin Password in the database Video Tutorial

Monthly Archives

Video Tutorials

Follow Us

cPanel Hosting
CloudLinux Hosting
imunify360 protected
Softaculous 1 click installs

Pin It on Pinterest

Share This