Home Uncategorized

How to Reset WordPress Password When You Can't Access Your Email

Last updated on Aug 15, 2025

How to Reset WordPress Password When You Can't Access Your Email

**Description:**If you've lost access to your WordPress admin password and can’t use your usual email for recovery, don’t worry—there are several alternative methods to reset your password using tools provided in your Eco Hosting shared hosting account. This guide will walk you through three straightforward methods suitable for users with basic technical knowledge, using cPanel, File Manager, and phpMyAdmin.


Table of Contents


Method 1: Reset Password via phpMyAdmin

This is the most common method for shared hosting customers to reset a WordPress password without email access.

Steps:

  1. Login to Your Eco Hosting cPanel

  2. Navigate to the Databases section and click on phpMyAdmin.

  3. In phpMyAdmin, select the database connected to your WordPress site (you can find the database name in your wp-config.php file).

  4. Click on the wp_users table from the left menu.

  5. Locate your username and click Edit.

  6. Find the user_pass field. In the "Function" dropdown, choose MD5.

  7. In the "Value" field, enter your new password (e.g., newpassword123).

  8. Click Go to save changes.

Example:

Field Function Value
user_pass MD5 newpassword123

You can now log in to WordPress with your new password.


Method 2: Reset Password via functions.php File

If you prefer not to use phpMyAdmin, you can temporarily add code to your theme’s functions.php file.

Steps:

  1. Login to cPanel and open the File Manager.

  2. Navigate to public_html/wp-content/themes/your-theme/.

  3. Locate and right-click on the functions.php file. Select Edit.

  4. Add the following line at the top, just after the opening <?php tag:

    wp_set_password('newpassword123', 1);
    
    • Replace 'newpassword123' with your desired password.

    • 1 is the default user ID for the first admin. If you’re resetting another user, check their user ID in the wp_users table.

  5. Save changes.

  6. Visit your WordPress login page and log in with the new password.

  7. Important: Remove the line you just added from functions.php after logging in, to avoid potential security issues.


Method 3: Use WordPress CLI (if available)

Note: This may only be available on certain hosting plans. If unsure, check your cPanel for a Terminal or SSH option.

Steps:

  1. Open your cPanel Terminal or connect via SSH.

  2. Navigate to your WordPress directory, e.g.:

    cd public_html
    
  3. Run the following command:

    wp user update [username] --user_pass=[newpassword]
    

    Example:

    wp user update admin --user_pass=newpassword123
    

Troubleshooting & Tips

  • **Can’t find the correct database?**Check the database name in your wp-config.php file (public_html/wp-config.php):

    define('DB_NAME', 'your_db_name');
    
  • Password not updating?

    • Double-check that you selected MD5 in phpMyAdmin.

    • Make sure you edited the correct user in wp_users.

    • Remove any added code from functions.php after use.

  • Site errors after editing files?

    • Check for syntax errors in functions.php (missing semicolons or parentheses).

    • Restore the original file from a backup if needed.


Still Need Help?

If you’re unable to reset your password using these methods, please submit a support ticket and our team will assist you further.


For more WordPress and cPanel tips, visit the Eco Hosting Help Centre.