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.

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.

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?
LLFiggs 2013-04-04 6: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.
LLFiggs 2013-04-04 6: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.
LLFiggs 2013-04-04 6: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.
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
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
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

Login to comment.

Your Opinion Matters

... but we need to know what you're thinking!

The Community Support team wrote the article you're looking at now. We like to think it's perfect, but we're sure you have some suggestions. Please, let us know what they are!

Feedback
Your Email Address
Because we'd like to talk with you!

Support 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.