Password reset in WordPress - where is my key?

4 Easy Ways to Reset Your WordPress Admin Password

In these days of security vulnerabilities, strong passwords are more important than ever. And resetting your WordPress admin access password regularly is a great idea since WordPress is popular, and hackers are always trying to gain access.

This article will lead you through how to reset your WP password, and how to create a strong password.

Resetting Your WordPress Admin Password

If you have access to your site, you can reset your WordPress admin password using their built-in password reset option. Here are the steps.

Via Your WordPress Dashboard

WordPress password reset done easy with the admin access. You can set a new WordPress admin password just like that.
  1. Log into your WordPress site and from the lefthand menu, choose Users.
  2. Select your user profile.
  3. Click the Edit option.
  4. Scroll down to Account Management
  5. Click Set New Password.
  6. Create a strong password.
  7. Scroll down to the bottom of the page and click Update Profile

And that’s it! You’ve reset your WordPress admin access password.

But what if you’ve forgotten your password?

Via the WordPress Login Page

The "Lost your password?" link on the WordPress login screen is the easiest way to reset your WordPress admin password

If you’ve forgotten your password, obviously the above won’t work. But all is not lost. Just follow these steps.

  1. Navigate to your-domain.com/wp-login to access the login page.
  2. Click on the Lost your Password? link.
  3. Fill in your Username or Email address and click Get New Password
  4. Check your email and follow the reset link in it. (Don’t see an email? Check your junk or spam folders.)
  5. You are now back on your Login page. Either use the auto-generated password that’s provided or create your own strong password.
  6. Save your password somewhere, preferably in a password manager program.
  7. Log in.

Via phpMyAdmin

cPanel - phpMyAdmin

Either of the above methods should work to reset your WordPress admin password, but if they don’t, there are other options. They’re just a bit more complex.

If you can’t access your Admin Dashboard or you no longer have access to the admin email address you used with WordPress, try the following.

phpMyAdmin holds your WordPress database. This database is unique to your site and, for the most part, it contains every bit of information your site contains—including your password.

To access your phpMyAdmin, head to your cPanel—or whatever control panel your host uses—and log in. Please note that any screenshots will be of cPanel, and if you use something different, the layout will be different as well. But the steps will remain the same.

  1. Log in to phpMyAdmin via your host’s cPanel
  2. Scroll down to the Databases menu and select phpMyAdmin
  3. A new tab will open, and you’ll be in your phpMyAdmin
  4. On the left, you will have a list of all the domains on your server. The correct one will be identified by the database name you created when you originally installed WordPress.
  5. Click the link to your database.
  6. On the left, you now have a menu of all your database tables. Select wp_users. (If you or a security plugin has changed your database prefix, the table name might be named something_unique _users)
  7. In the right panel, you now have a list of your WordPress users. Select Edit in the column that matches your user_login.
    Graphical user interface, text, application, email

Description automatically generated
  8. Delete the value in the user_pass field and add a new strong password.
  9. Under the function column, select MD5 from the drop-down menu and then click on the Go button at the bottom of the form.
WordPress database's users table, how to reset password with the user_pass field

Via FTP and your functions.php File

One more way to reset your WordPress admin password is via the functions.php file. However, be very careful. Doing something wrong in this file could break your site, so you should create a backup of it before you make any changes. Additionally, this only works if you’re attempting to log into the Administrator account.

You’ll need the FTP login credentials that your host provided when you signed up.

Template directory - function.php file
  1. Connect to your FTP server.
  2. Navigate to the root folder for your site.
  3. Find and open your wp-content folder.
  4. Find and open your wp-content/themes folder.
  5. Select the folder for the theme your site is currently using.
  6. Find the functions.php file and make a backup copy.
  7. Right-click on the file and select Edit. Or just double-click.
  8. Add wp_set_password(‘password’,1); after the <?php tag as shown below.
  9. Exit and save the file, but don’t exit your server just yet.
How to reset the password with the functions.php file

You’re not quite done. There are a few more steps.

  1. Go to your WP login page and log in using the following credentials.
    Username = Your current username or email address
    Password = password (the word password!)
  2. The page will refresh, leaving you with a blank form, but do not try to log in.
  3. Head back to your functions.php file and remove the line of code you just added. Then exit and save.
  4. Return to your login page and finish logging in using the above credentials.
  5. Once you’re logged in, you can use the steps in the first method in this article to change your password to something strong.

How to Create a Strong WordPress Password

Following these guidelines to create a strong password will create additional security for your site.

  • A minimum of 12 characters—the more the better
  • A random mixture of uppercase and lowercase letters
  • A random mixture of letters and numbers
  • At least one special character such as ! @ # $ % ^ etc.

Regularly Change Passwords & Monitor Your WordPress Admin

Getting into the practice of regularly changing passwords is a smart idea. Even if you use a strong password, hackers have multiple ways they’ll use to find or break them.

WP Admin Audit allows you to force users to regularly change their passwords.

There are methods and layers when it comes to securing your WordPress site, but one more thing you can do is monitor what’s happening in the backend. Even if you’re the sole user, it still makes sense to have a record of events that could impact site security and usability.

Install WP Admin Audit so you can keep an eye on security-relevant events on your site.