1. Home
  2. CMS
  3. WordPress
  4. What to do if you have lost a WordPress Password

What to do if you have lost a WordPress Password

What to do if you have lost a WordPress Password
What to do if you have lost a WordPress Password

If you happen to know your last WordPress admin password and would like to change it, you can update the password at ease from the WordPress dashboard.
Step 1: Log into your WordPress dashboard
Step 2: On the left-hand menu, click on ‘Users’.

Step 3: Hover your mouse over the admin user and click ‘Edit’.

Step 4: Go to the very bottom and put in your new secure password twice or click on ‘Generate Password’ and click on ‘Update Profile’.

Step 5: You will then see that your admin profile has been updated.

Reset your WordPress password via email

If you cannot remember your WordPress admin password, you can reset it via email from the WordPress dashboard login page using the next steps:

  1. Navigate to your WordPress login page (example.com/wp-admin).
  2. Click ‘Lost your password?’ at the bottom.
  3. Fill in the username or email of your WordPress admin user before clicking on ‘Get New Password’.
  4. You will receive an email with the subject ‘[WordPress Site] Password Reset’. In this email you will receive a link below the text: ‘To reset your password, visit the following address’. Go ahead and click that link.
  5. Next you will be able to fill in your new password. After you do so, confirm and click on ‘Reset Password’.

Directly changing your WordPress password using phpMyAdmin

  1. Login to cPanel.
  2. Below the databases area, click on ‘phpMyAdmin’.
  3. Click on the name of your WordPress database.
  4. Then, click the ‘wp_users’ table.
  5. Press the ‘Edit’ button next to your WordPress admin user.
  6. Once you are in the ‘user_pass’ field, enter your password by pressing Ctrl –V. From the drop-down, choose ‘MD5′. Lastly, click on ‘Go’.

You will then see a success message from phpMyAdmin which says the database record was updated.

Changing your WordPress password via FTP

In case you do not have access to your WordPress database, you could just reset your password with FTP.

  1. Login to your website via FTP and go over to your theme’s ‘functions.php’ file and download it to your local computer.In our case it was: ‘/home/userna5/public_html/wp-content/themes/twentyfourteen/functions.php’
  1. On the second line, right after the first ‘<?php’ line append the following below.

In our example, we will be setting a password to password, then we will update it for the user admin. If your admin user happens to have a different username, you will want to ensure to be using that.
Make sure that you are using a secure WordPress password.

  1. Upload the edited ‘functions.php’ file back to your ‘/themes’ folder on the server.
  2. Login to your WordPress dashboard with the new temporary password you have just set.
  3. Since you have successfully reset your password, you may now delete the line ‘wp_set_password’ from the local ‘functions.php’ file and re-upload it. This is so that WordPress will not reset the password each time the admin dashboard is accessed going forward.

Using the Emergency Password Reset Script

In case the solutions above did not work for you, you can try using the Emergency Password Reset Script. This is not a plugin, it is a PHP script.
Things you need to know about this script:
You will have to know the admin username.
This script updates the admin password and sends an email to the admin’s email address.
If you do not receive an email, the password still changes.
The script is to be put at the root of your WordPress installation.
Deleting the script after finishing is extremely important for security reasons.
How to use the script.

  1. Copy the emergency script from here: Emergency Password Script. Put this into a file called ‘emergency.php’ at the root of your WordPress installation.
  2. Go to the script using your web browser. http://domain.com/emergency.php
  3. Fill in the WordPress admin username (usually just admin) and then the new password, then click on ‘Update options’.
  4. Remove the ‘emergency.php’ file from the server after you are finished with it. Do not leave this script on your account, otherwise it becomes a security risk which will allow somebody to use it and change your password.
Updated on December 23, 2018

Was this article helpful?

Related Articles

Leave a Comment

[apsl-login-lite login_text='Please login with a social account']