When the administrators password is lost or you forget the username for your WordPress dashboard, the password can be reset and the username can be recovered. This article will explain how to reset the password with the wp_set_password(); function and through PhpMyAdmin, and how to recover your username from PhpMyAdmin.

Easy method - Using the "Forgot Password?" button

If you have an email address that you have access to defined within your Wordpress admin user account, you can simply click on the "Forgot Password?" button below the login form. After doing so, it will send your password to the email account on file for that user.

Changing the password with wp_set_password();

The WordPress password can be changed by adding code to the functions.php file in your theme folder. Below are the steps to accomplish this..

  1. Login into your cPanel.
  2. Navigate to the following location of your theme folder through the File Manager.

    /public_html/your-user/wp-content/themes/your-theme/functions.php

  3. Edit the file with the code editor. Add the following code to the beginning of the file directly after <?php:
  4. wp_set_password('password',1);

  5. Save the file.
  6. Go to your WordPress admin and log in with the new password.

    Important! Make sure you remove the code and update your password. If not, the page will continually reset the password with the script.

Changing the password in the WordPress Administrator Dashboard

The administrator dashboard allows you to change passwords using the USERS option:
  1. Login to the WordPress Dashboard.
  2. Choose USERS from the Administrator Panel.
  3. Hover over the username that requires the password reset and then click on EDIT when it appears under the user name.
  4. Scroll down to the New Password field and enter the new password.
  5. Repeat the password in the Repeat New Password to confirm the change.
  6. Click on Update Profile in order to save the new password.

PhpMyAdmin: Find the Username and reset the password

Resetting your password or recovering your username through PhpMyAdmin can be an easier way . The following steps will explain how to reset your WordPress Dashboard password and find your username with PhpMyAdmin.

Important! Always remember to have a backup of your database before doing any direct editing on that database.

  1. Login into your cPanel.
  2. Go to Databases > PhpMyAdmin.
  3. Select your wordpress database on the left side. 
  4. You should see a list of all your tables in the Wordpress database.

    Select the wp_users table.

  5. Locate your Username or the first user (The first user is usually the administrator user) in the list.

    Click Edit (The pencil icon).

  6. Here is where you can recover the username and reset the password.

    The user_login field is the username for the admin login.

    The user_pass field is where the password is stored.

    Type a new password in the password field.

  7. Click on the dropdown box in the "function" field and select MD5 from the list

    Click "Go"

  8. Now you can go to your wp-admin dashboard and login with the new password.
Did you find this article helpful?

We value your feedback!

Why was this article not helpful? (Check all that apply)
The article is too difficult or too technical to follow.
There is a step or detail missing from the instructions.
The information is incorrect or out-of-date.
It does not resolve the question/problem I have.
How did you find this article?
Please tell us how we can improve this article:
Email Address
Name

new! - Enter your name and email address above and we will post your feedback in the comments on this page!

Did you find this article helpful?

Comments

2013-04-04 2:57 pm
I've tried these numerous times, but can't get the change to stick. Now I can't log into the admin panel at all.
Staff
13,461 Points
2013-04-04 3:44 pm
Hello LLFiggs,

I'm sorry you're having problems with the login. Our Technical Support can reset the password for you live while you're on the phone, so they will be your best course of action. We can't post the information here in the Support center. Posts here are open to the public.

Contact info: http://www.webhostinghub.com/contact-us.html

If you have any further questions, please contact technical support or leave a comment at the bottom of the page.

Regards,

Arnel C.
Community Support
n/a Points
2014-08-20 4:28 am

I know that most hostings offer phpmyadmin or alternative, but some don't (e.g., VPS hosts) so here's how to reset password without phpmyadmin. ftp access is needed of course:http://www.digitalette.com/wordpress/reset-wordpress-admin-password/

Staff
9,290 Points
2014-08-20 9:30 am
Hello EB,

Hello Sudip,

Thank you for your suggestion. Also feel free to post in our User Submitted Articles section. You can then link to your own posts and list yourself as a contributor in Google Authorship.

If you have any further questions, feel free to post them below.
Thank you,

-John-Paul

Post a Comment

Name:
Email Address:
Phone Number:
Comment:
Submit

Please note: Your name and comment will be displayed, but we will not show your email address.

Related Questions

Here are a few questions related to this article that our customers have asked:
Would you like to ask a question about this page? If so, click the button below!

Help Center Search

Current Customers

Email: support@WebHostingHub.com Ticket: Submit a Support Ticket
Call: 877-595-4HUB (4482)
757-416-6627 (Intl.)
Chat: Click To Chat Now

Ask the Community

Get help with your questions from our community of like-minded hosting users and Web Hosting Hub Staff.

Not a Customer?

Get web hosting from a company that is here to help.