Resetting a Lost WordPress Admin Password

Resetting a Lost WordPress Admin Password

There are three ways to reset a WordPress admin password, depending on what you have access to.


Method 1: WordPress Login Screen (easiest)

If you can reach the WordPress login page but have forgotten your password:

  1. Go to https://yourdomain.com/wp-login.php
  2. Click Lost your password?
  3. Enter your email address or username
  4. Click Get New Password
  5. Check your email inbox for a reset link (check spam if it does not arrive within a few minutes)
  6. Click the link and set a new password

If the email never arrives: check that the email address on your WordPress account is correct. You can verify or update it using Method 2 or 3 below.


KPanel's WordPress Console tab gives you WP-CLI access without needing SSH.

If you know the username:

  1. Go to your site in KPanel
  2. Click WordPress in the top navigation
  3. Click the Console tab
  4. Type the following (without the wp prefix):
    user update admin --user_pass=YourNewPassword123
    
    Replace admin with your actual username and YourNewPassword123 with your new password.
  5. Click Run

If you do not know the admin username:

First list all users to find the administrator:

user list --role=administrator --format=table

This shows the login name, email, and user ID of all admin accounts. Then use the user update command above with the correct username, or update by user ID:

user update 1 --user_pass=YourNewPassword123

Replace 1 with the actual user ID shown in the list.


Method 3: Via phpMyAdmin

Use this if the WP-CLI console is unavailable or you prefer working directly in the database.

  1. In KPanel, go to Files in the top navigation, then click Database
  2. Open phpMyAdmin (see Database Management guide if you need help)
  3. Select your WordPress database (usually named after your site user)
  4. Click on the wp_users table
  5. Find the row for your admin account and click Edit
  6. In the user_pass field, clear the existing value
  7. From the Function dropdown next to user_pass, select MD5
  8. Type your new password in the Value field
  9. Click Go to save

WordPress will hash the password using MD5 when you save it this way. Log in and immediately change your password via the WordPress admin (the MD5 hash is less secure than WordPress's default bcrypt).


Resetting a Password from the Users Tab

KPanel's WordPress tab also has a Reset PW button in the Users section. This sends a password reset email to the user's registered email address -- the same as Method 1 but triggered from KPanel rather than the WP login screen.

  1. Go to WordPress in the top navigation
  2. Click the Users tab
  3. Find the user and click Reset PW

If the Email Reset Never Arrives

  1. Check spam and junk folders
  2. Confirm the email address is correct by using WP-CLI: option get admin_email
  3. Check that your site can send email. If outbound email is broken, use Method 2 (WP-CLI) or Method 3 (phpMyAdmin) instead.
Was this article helpful?

Still need help?

Our support team is here on business days, NZT.

Back to Help Centre