If you happen to know your last WordPress admin password and you’d like to change it, you could update the password at ease from the WordPress dashboard.
Step 1: Log into your WordPress dashboard
Step 2: On the left hand menu, press on Users.
Step 3: Put your mouse over the admin user and press Edit.
Step 4: Go to the very bottom, then put in your new secure password twice or click on ‘Generate Password’ and press on Update Profile.
Step 5: You will then see that your admin profile has been updated.
Reset your WordPress password via email
If you don’t remember your WordPress admin password, you could just reset it via email from the WordPress dashboard login page using the next steps:
- Navigate to your WordPress login page (example.com/wp-admin)
- Press “Lost your password?” at the bottom.
- Fill in the username or email of your WordPress admin user, then press on Get New Password.
- You will receive an email with the subject [WordPress Site] Password Reset. In this email you’ll receive a link below the text “To reset your password, visit the following address” go ahead and press that link.
- Next you’ll be able to fill in your new password, after you did so, confirm and press on Reset Password.
Directly changing your WordPress password using phpMyAdmin
- Login to cPanel.
- Below the databases area, press on phpMyAdmin.
- Press on the name of your WordPress database.
- Then, press the wp_users table.
- Press the Edit button next to your WordPress admin user.
- Once you’re in the user_pass field, put in 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’re with out access to your WordPress database, you could just reset your password with FTP.
- 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
- On the second line, right after the first <?php line append the following:
In our example, we’ll be setting a password to password, then we’ll update it for the user admin, if your admin user happens to have a different username, you’ll want to ensure to be using that.
Please make sure that you are using a secure WordPress password.
- Upload this edited functions.php file back to your /themes folder on the server.
- Login to your WordPress dashboard with the new temporary password you’ve just set.
- Since you’ve successfully reset your password, you may delete the line wp_set_password from the local functions.php file, then re-upload it. So that WordPress won’t reset the password each time the admin dashboard is accessed going forward.
Using the Emergency Password Reset Script
In case the solutions above didn’t work for you, then you could try using the Emergency Password Reset Script. This isn’t a plugin, it’s a PHP script.
Things you need to know about this script:
You’ll have to know the admin username
This script updates the admin password and sends an email to the admin’s email address.
In case you don’t 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 you can use this script
- Copy the emergency script from here Emergency Password Script and put it in a file called emergency.php at the root of your WordPress installation.
- Go to the script using your web browser. http://domain.com/emergency.php
- Fill in the WordPress admin username (usually just admin) and then the new password, then press Update options
- Remove the emergency.php file from the server after you are finished with it. Don’t leave this script on your account, otherwise it becomes a security risk which will allow somebody to use it and change your password.