If you have forgotten your WordPress admin password or cannot log in to your dashboard, you can reset it using several methods. This guide covers the most common approaches, from the simplest (email reset) to advanced methods using cPanel and phpMyAdmin.

Method 1: Use the "Lost Your Password?" Link

This is the simplest method if you still have access to the email address associated with your WordPress account:

  1. Go to your WordPress login page: yourdomain.com/wp-login.php
  2. Click "Lost your password?"
  3. Enter your WordPress username or the email address associated with the account.
  4. Click Get New Password.
  5. Check your email inbox for the password reset email.
  6. Click the link in the email and set a new password.

Method 2: Reset via phpMyAdmin (When Email Does Not Work)

If you cannot receive the reset email, you can change the password directly in the database:

  1. Log in to cPanel.
  2. Go to DatabasesphpMyAdmin.
  3. Select your WordPress database from the left sidebar.
  4. Find the wp_users table and click it.
  5. Find your admin username in the list. Click Edit (the pencil icon) next to your username.
  6. In the user_pass field, you need to enter a new password in hashed format.
  7. To generate a hash, visit https://api.wordpress.org/secret-key/1.1/salt/ or use an online WordPress password hash generator.
  8. Paste the hashed password into the user_pass field.
  9. Click Go to save the changes.
  10. Log in to WordPress with your new password.

Method 3: Reset via the Emergency Password Reset Script

WordPress includes an emergency script that can reset passwords via FTP or File Manager:

  1. Download the Emergency Password Reset Script from the WordPress plugin repository (emergency.php).
  2. Upload the emergency.php file to your public_html directory via File Manager.
  3. Visit yourdomain.com/emergency.php in your browser.
  4. Enter your WordPress admin username and the new password.
  5. Click Update Options.
  6. Immediately delete the emergency.php file from your server after resetting the password.

Important Notes

  • The password reset email may take a few minutes to arrive. Check your spam folder if you do not see it.
  • If you do not receive the reset email, your server may not be sending emails correctly. Contact your hosting provider.
  • When using phpMyAdmin, always use a properly hashed password. WordPress will not accept a plain-text password in the database.
  • After resetting your password, WordPress will log you out of all other sessions.
  • For security, use a strong, unique password with a mix of uppercase, lowercase, numbers, and symbols.

Troubleshooting

Password reset email is not arriving:

  • Check your spam or junk folder.
  • Verify the email address on your WordPress user profile matches the email address you are checking.
  • Your hosting provider may have disabled the mail() function. Contact support.

phpMyAdmin method does not work (invalid password after change):

  • Ensure you pasted a valid WordPress password hash, not plain text.
  • Use the MD5 hash tool in phpMyAdmin to generate a hash, or use the WordPress function wp_hash_password().

Locked out of WordPress entirely:

  • Contact your hosting provider for assistance.
  • Use the phpMyAdmin method above to reset the password directly in the database.
Was this answer helpful? 0 Users Found This Useful (0 Votes)