WordPress

How to Reset Your WordPress Password

Updated November 2026 5 views 9 min read
WordPress | Updated November 2026

If you are locked out of your WordPress dashboard, there is almost always a way back in. This guide covers every method for resetting a WordPress admin password on your Ultra Web Hosting account, in the order you should try them: the built-in email reset link, changing it from inside the dashboard, resetting it directly in the database with phpMyAdmin when you are fully locked out, and using WP-CLI over SSH. It also covers the most common snag, not receiving the reset email, and how to secure the account once you are back in.

Pick the Right Method

Which One Applies to You?

The fastest path depends on how locked out you actually are. Start at the top of this list and drop down only when a method does not fit your situation.

  • Know the password, just changing it: use the dashboard, Section 04
  • Forgot it but email works: use the email link, Section 02
  • Email never arrives or the admin address is wrong: phpMyAdmin, Section 05
  • Comfortable on the command line: WP-CLI over SSH, Section 06

01. Before You Start: Back Up First

Two of the methods below edit your database directly. That is safe when done correctly, but a mistake in the wrong table can break your site, and there is no undo button. Before you touch phpMyAdmin or run any SQL, export a copy of your database so you can restore it if something goes wrong.

Export the Database Before Editing It

In cPanel, open phpMyAdmin, select your WordPress database in the left column, click the Export tab, and download the .sql file. This takes a few seconds and gives you a clean copy to restore from. A full account backup through the cPanel Backup Wizard is better still. Every Ultra Web Hosting plan keeps automatic backups you can roll back to as well, covered in our guide on backing up your website (ID 467).

If you are only using the email link (Section 02) or the dashboard (Section 04), no backup is needed, since neither one edits the database by hand.

02. Method 1: The Lost Your Password Email Link

This is the method WordPress is built around, and it works whenever you can still receive email at your admin address. It is the right first try for almost everyone.

  1. Go to your login screen at yourdomain.com/wp-login.php (or yourdomain.com/wp-admin, which redirects there).
  2. Click the Lost your password? link below the login form.
  3. Enter your username or the email address on the account and submit.
  4. WordPress emails you a reset link. Open it, choose a strong new password, and save.
  5. Log in with the new password.
Note

The reset link is single use and expires after about a day. If it has gone stale, just request a new one. If the link opens a page that says the key is invalid, request a fresh email rather than reusing an old link from your inbox.

03. Not Getting the Reset Email?

This is the single most common reason people end up resetting a WordPress password the hard way. WordPress sends its reset mail through the server's PHP mailer, and several things can quietly stop it from arriving. Work through these before giving up on the email method.

  • Check spam and junk. WordPress system mail often lands there. Search your mailbox for the sender [email protected].
  • Confirm the admin email is correct. If the address on the account is old or wrong, the reset goes to an inbox you cannot read. You cannot see or fix this from the login screen, which is exactly why Section 05 (phpMyAdmin) exists.
  • Deliverability. If the site sends mail from a domain whose SPF, DKIM, and DMARC records are not set up, receiving providers may silently drop it. An SMTP plugin that sends through a real mailbox is the reliable long-term fix for all WordPress mail, not just password resets.
Tip

If the reset email is missing because the admin address itself is wrong, do not fight the email system. Jump straight to phpMyAdmin in Section 05, where you can reset the password and correct the admin email address in the same session.

04. Method 2: Change It From Inside the Dashboard

If you are still logged in and simply want to set a new password, or an administrator needs to reset the password for another user, you never need the database at all. Do it from the dashboard.

To change your own password:

  1. In the WordPress admin, hover the account name at the top right and click Edit Profile (or go to Users > Profile).
  2. Scroll to the Account Management section and click Set New Password.
  3. Accept the strong password WordPress suggests, or type your own, then click Update Profile.

To reset another user's password (administrators only):

  1. Go to Users > All Users and click the user you need to reset.
  2. In Account Management, click Set New Password and set it.
  3. Click Update User. Optionally tick Send the user notification so they get the new credentials by email.

05. Method 3: Reset Through phpMyAdmin

This is the method for when you are fully locked out: you forgot the password, and the reset email never arrives or goes to an address you no longer control. Because it writes a new password straight into the database, it does not depend on email at all. This is the most reliable fallback.

First, find which database your site uses. Open wp-config.php in cPanel File Manager and note the DB_NAME value, and the table prefix:

define( 'DB_NAME', 'user_wp123' );
$table_prefix = 'wp_';

Most installs use the wp_ prefix, so the users table is wp_users. If your prefix is different, for example wpab1_, your table is wpab1_users and you must substitute that everywhere below.

  1. In cPanel, open phpMyAdmin.
  2. In the left column, click the database name you found in wp-config.php.
  3. Click the SQL tab at the top.
  4. Run this statement, replacing the new password and the username with your own:
UPDATE wp_users SET user_pass = MD5('NewPassword123')
WHERE user_login = 'admin';

Click Go. You should see "1 row affected." Now log in at yourdomain.com/wp-login.php with the new password.

Why MD5 Is Fine Here

WordPress stores passwords as a salted hash, not as MD5, so this looks wrong at first glance. It is not. WordPress recognizes a plain MD5 value, accepts it for the next login, and automatically re-saves the password using its own stronger hashing the moment you log in. You never need to run the hashing yourself. This is a long-standing, supported behavior.

If you are in phpMyAdmin because the admin email was wrong, fix it in the same place. The address lives in the same row:

UPDATE wp_users SET user_email = '[email protected]'
WHERE user_login = 'admin';
Edit Only the Row You Mean To

The WHERE user_login = 'admin' clause is what limits the change to one account. Do not omit it, or you will overwrite the password on every user at once. If you are not sure of the exact username, browse the wp_users table first (click the table name, then Browse) and read the user_login column before running the update.

06. Method 4: Reset With WP-CLI Over SSH

If your plan has SSH access and WP-CLI is available, this is the fastest method of all: one command, no database editing by hand, and WordPress does the correct hashing for you. SSH access is covered in our guide on connecting to your account over SSH (ID 60).

Connect over SSH, change into your site's document root (usually public_html), and run:

cd ~/public_html
wp user list
wp user update admin --user_pass='NewPassword123'

wp user list shows the usernames and their roles so you target the right account. wp user update then sets the new password, hashed properly by WordPress. You can target a user by login name or by numeric ID.

Tip

If wp is not found, WP-CLI may not be installed for your account. The phpMyAdmin method in Section 05 works on every plan and needs no command line, so use that instead. If you believe WP-CLI should be available and it is not, open a ticket and we will check it for you.

07. Emergency Method: A Temporary Snippet

There is one more fallback for the rare case where you can edit your theme files but cannot reach phpMyAdmin or SSH. It forces a password on next page load, then must be removed immediately. Treat it as a last resort.

  1. In cPanel File Manager, edit your active theme's functions.php (under wp-content/themes/your-theme/).
  2. Add this line just after the opening <?php tag, changing the password and username:
wp_set_password( 'NewPassword123', 1 );

The 1 is the user ID, which is the first administrator on most sites. Save the file, then load any page of your site once so the code runs. Log in with the new password.

Remove It at Once

This line resets the password on every single page load while it is present, which means you can never stay logged in and anyone hitting your site re-triggers it. The moment you have logged in, go back and delete the line, then save functions.php again. Leaving it in place will lock you back out.

08. After You Regain Access: Lock It Down

Getting back in is half the job. If you were locked out because the password was guessed, or you are not sure why it changed, spend five minutes closing the gap so it does not happen again.

  • Use a strong, unique password. Let WordPress generate one and store it in a password manager. Reused passwords are the most common way admin accounts fall.
  • Confirm the admin email is correct under Settings > General and Users, so the email reset works next time.
  • Check for users you do not recognize. An unexpected administrator account can mean the site was compromised rather than simply forgotten. If you find one, work through our guide on fixing a hacked WordPress site (ID 478).
  • Harden logins. Limit login attempts and consider two-factor authentication. Our complete WordPress hardening guide (ID 309) walks through the full checklist.
This Is Not Your cPanel Password

Resetting a WordPress login changes only who can get into the WordPress dashboard. It is separate from your cPanel password, your email account passwords, and your billing login. If you are trying to reset one of those instead, see our guide on changing your cPanel password (ID 73).

Still Locked Out?

If none of these methods get you back in, our support team can reset the password on the server and check whether anything else is wrong with the install. Send us your domain and the username you are trying to recover.

Open a Support Ticket

Quick Recap: Resetting a WordPress Password

If you only remember a few things from this guide, remember these:

  1. Try the email link first with Lost your password? on the login screen.
  2. If the email never arrives, check spam, then suspect a wrong admin email address.
  3. Already logged in? Change it under Users > Profile, no database needed.
  4. Fully locked out? Reset it in phpMyAdmin with an UPDATE wp_users statement, and back up the database first.
  5. Afterward, set a strong unique password, fix the admin email, and check for unknown users.

Last updated November 2026 · Browse all WordPress articles

Share: X in Reddit f Email
  • 0 Users Found This Useful

Was this answer helpful?

Related Articles

WordPress Security

🔒 WordPress Security Guide | Updated January 2026 WordPress powers over 40% of the...

How to Disable WordPress Comments Pingbacks and Trackbacks

WordPress | Updated March 2026 WordPress enables comments, pingbacks, and trackbacks by...

The WordPress app doesn't work with my website

WordPress | Updated January 2026 If the WordPress mobile app (for iOS or Android) cannot...

WordPress Error: Missing a Temporary Folder

WordPress | Updated March 2026 The "Missing a temporary folder" error in WordPress occurs...

How to Fix a Hacked WordPress Site

WordPress Security | Updated January 2026 If your WordPress site has been hacked, defaced, or...



Save 30% on web hosting - Use coupon code Hosting30