Where WordPress stores your login information in cPanel

Your WordPress username and password live in two places inside cPanel: the username is stored in your WordPress database, and the password is encrypted and stored there too. cPanel gives you direct access to both through its file manager and database tools, so you can retrieve or reset them without contacting your hosting company.

The fastest route depends on what you need. If you remember your password but forgot your username, you can find it in the database in under two minutes. If you forgot both, or if you need to change your password, you have two reliable methods: look it up in the database, or reset it through the WordPress files themselves.

Key Takeaways

  • Your WordPress username is stored in the wp_users table of your WordPress database, visible through cPanel's phpMyAdmin tool.
  • Passwords are encrypted in the database, so you cannot read them directly — you must reset the password instead of retrieving it.
  • The fastest password reset uses the wp-config.php file to generate a new one, taking about five minutes total.
  • If you cannot access cPanel, you can reset your password by editing wp-config.php through your hosting provider's file manager or FTP.

Finding your username through phpMyAdmin

Log into cPanel with your hosting account credentials. Look for the Databases section and click phpMyAdmin. On the left side, you will see a list of databases — click the one that matches your domain name or contains "wordpress" in the name.

Once inside the database, look for a table called wp_users (or sometimes wp_1_users if you have multiple WordPress sites). Click on it. You will see a row with your site information. The user_login column contains your WordPress username. Write it down exactly as it appears, including capitalization.

If you see multiple usernames in the wp_users table, the one with user_id 1 is almost always the main admin account. That is the username you use to log into WordPress.

Resetting your password through phpMyAdmin

In the same phpMyAdmin window where you found your username, look at the row for your account. On the far right, click Edit. You will see all the fields for that user account.

Find the field called user_pass. Click inside it and delete whatever is there. Type a new password — it can be anything you want, but write it down somewhere safe. Before you close the window, look for a dropdown menu next to the password field that says MD5 or SHA1. Change it to MD5 if it is not already set there. This encrypts your password in the format WordPress expects.

Click Go or Save at the bottom of the page. Your new password is now active. Log into WordPress using your username and the new password you just created.

Resetting your password by editing wp-config.php

If phpMyAdmin is not working or you prefer not to use it, you can reset your password by adding code to your wp-config.php file. Log into cPanel and open File Manager. Navigate to the folder where WordPress is installed — usually the public_html folder or a subfolder inside it.

Find the file called wp-config.php and right-click it. Choose Edit. Scroll to the bottom of the file, just before the line that says /* That's all, stop editing! */. Add this line:

update_option('admin_email','your-email@example.com');

Replace your-email@example.com with the email address connected to your WordPress account. Save the file. Now go to your WordPress login page and click Lost your password? Enter that email address. WordPress will send you a password reset link. Click the link in the email and create a new password.

After you have reset your password, go back to wp-config.php and delete the line you added. This prevents the code from running every time someone visits your site.

What to do if you cannot access cPanel

If your hosting account password is also lost, contact your hosting provider's support team. They can verify your identity and reset your cPanel password, which gives you access to everything else. This usually takes a few hours.

While you wait, if you have FTP access set up on another computer, you can connect via FTP and edit wp-config.php directly using the password reset method described above. FTP credentials are different from your cPanel login, so you may still have access even if cPanel is locked.

Finding your password if you wrote it down elsewhere

If you saved your WordPress password in your browser's password manager, you can retrieve it without touching cPanel. In Chrome, Firefox, Safari, or Edge, go to your settings and look for Passwords or Saved Passwords. Search for your WordPress site's URL. Your browser will show you the username and password you saved.

If you saved it in a password manager like Bitwarden, 1Password, or LastPass, open that app and search for your WordPress site. The password will be there in plain text.

Preventing password loss in the future

After you have regained access, store your WordPress username and password in a password manager rather than writing them on paper or saving them in a browser. Password managers like Bitwarden (free), 1Password, or Dashlane encrypt your credentials and sync them across your devices.

Consider setting up two-factor authentication on your WordPress site as well. This adds a second security step when you log in, so even if someone has your password, they cannot get into your account without a code from your phone. Most WordPress sites can enable this through a plugin like Wordfence or Two Factor Authentication.

Frequently Asked Questions

Can I see my password if I know my username?

No. WordPress encrypts passwords in the database so that even site administrators cannot read them. You can only reset the password to something new, not retrieve the old one. This is a security feature that protects your account.

What if I see multiple usernames in the wp_users table?

Each row is a different user account. The one with user_id 1 is your main admin account. If you have other usernames, those belong to editors, authors, or contributors you added to your site. Reset only the password for the account you need.

Do I need to know my old password to create a new one?

No. You can reset your password without knowing the old one. Use either the phpMyAdmin method or the wp-config.php method described above. Both work even if you have completely forgotten your current password.

Will resetting my password log me out of WordPress?

Yes. After you reset your password, you will be logged out of WordPress. You will need to log back in using your username and the new password. This is normal and expected.

What if my hosting provider uses a different database tool instead of phpMyAdmin?

Some hosts use Adminer or another database manager. The steps are the same: find the wp_users table, locate your username in the user_login column, and edit the user_pass field to reset your password. Set the password field to MD5 encryption before saving. If you are unsure how to use your host's tool, contact their support team.