At times, you may find yourself locked out of your WordPress admin account. Whether you've forgotten your password or need to change it for security reasons, this guide will walk you through three different methods to reset your WordPress admin password.

Method 1: Resetting the Password via Softaculous in cPanel

  1. Open your cPanel and navigate to the WordPress Manager by Softaculous.
  2. Scroll down to locate the WordPress installation for which you need to change the password.
  3. Click the edit icon (a pencil) next to the relevant installation. This will direct you to the installation editing screen.
  4. Scroll to the Admin Account section and locate the Admin Password field. Enter a new, secure password that you can remember.
  5. Now, return to your site and log in using your newly set password.

Method 2: Resetting the Password via FTP

If you're comfortable with FTP, you can also reset your password using this method.

  1. Access your site using an FTP client or a code editor with FTP capabilities.
  2. Navigate to the root directory of your site, then proceed to wp-content/themes. Locate the folder of your currently active theme.
  3. In this folder, find the functions.php file. Download it for editing, but remember to create a backup first to prevent any issues.
  4. Add the following line of code right after the opening <?php tag: wp_set_password( 'new_password', 1 );. Replace 'new_password' with your desired password. The '1' refers to the User ID, where '1' is typically the administrator.
  5. Save the modified file and upload it back to your site, overwriting the old version.
  6. Your admin password will now be the one you set in the functions file. Log in to your site to confirm access.
  7. Once logged in, remember to remove the line of code you added in the functions.php file.

Method 3: Using the Lost Password Link

If you have access to the email account associated with your WordPress account but can't remember your password, you can use the 'Lost your password?' link to reset it.

  1. Navigate to your WordPress login page, typically located at /wp-admin (e.g., https://domain.com/wp-admin).
  2. Click on the 'Lost your password?' link.
  3. Enter your username or the email address associated with your WordPress account, then click 'Get New Password'. You'll receive an email with a link to create a new password.
  4. Follow the link in the email to reset your password.
  5. Log into your site using your new password and your username or email address.

And there you have it! You've successfully reset your WordPress admin password. Remember, it's always a good idea to use a strong, unique password to ensure the security of your account.