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:
- Go to
https://yourdomain.com/wp-login.php - Click Lost your password?
- Enter your email address or username
- Click Get New Password
- Check your email inbox for a reset link (check spam if it does not arrive within a few minutes)
- 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.
Method 2: WP-CLI via KPanel (recommended for most cases)
KPanel's WordPress Console tab gives you WP-CLI access without needing SSH.
If you know the username:
- Go to your site in KPanel
- Click WordPress in the top navigation
- Click the Console tab
- Type the following (without the
wpprefix):
Replaceuser update admin --user_pass=YourNewPassword123adminwith your actual username andYourNewPassword123with your new password. - 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.
- In KPanel, go to Files in the top navigation, then click Database
- Open phpMyAdmin (see Database Management guide if you need help)
- Select your WordPress database (usually named after your site user)
- Click on the
wp_userstable - Find the row for your admin account and click Edit
- In the
user_passfield, clear the existing value - From the Function dropdown next to
user_pass, selectMD5 - Type your new password in the Value field
- 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.
- Go to WordPress in the top navigation
- Click the Users tab
- Find the user and click Reset PW
If the Email Reset Never Arrives
- Check spam and junk folders
- Confirm the email address is correct by using WP-CLI:
option get admin_email - Check that your site can send email. If outbound email is broken, use Method 2 (WP-CLI) or Method 3 (phpMyAdmin) instead.
