How to change or reset WordPress admin password? (4 Easy Methods)

Have you ever found yourself staring at the WordPress admin login page, scratching your head, trying to remember what the username and password for your site was.

Or maybe you just forgot the password and now you’re ripping hair out, jumping through multiple hoops only to find that you need the email address you registered with to reset the password. Cue mental breakdown. 

We’ve all been there! Cursing at ourselves for not storing the credentials somewhere accessible or just saving the password on Google Password Manager. 

If you can relate then you’re at just the right place. 

In the following article we’ll discuss every single possible way you can change and reset WordPress admin password, under the sun. We’ll go through some of the standard ones as well as some that require some code wizardry.

Table of Contents
    Add a header to begin generating the table of contents

    Method 1: How to change WordPress admin password Via WordPress login page

    The first one is probably the most straightforward one. 

    If you forgot the wordpress admin password just click on “Lost your password?” located below the user and password prompt in your WordPress login page. 

    How to change or reset WordPress admin password

    Next you’ll see another prompt asking for your username or email address. Provide it.

    Enter your username or email address to reset password

    Then just open the email sent from WordPress and click on the password reset link.

    WordPress default Password reset email

    This is how you achieve WordPress admin password reset using the WordPress login page.

    There’s one more things to note however. Most WordPress sites have the default login page URL set to:

    				
    					http://yourdomain.com/wp-admin
    				
    			

    Attackers often target this page and simply try to brute force their way into your site.

    This can be catastrophic so a simple yet elegant solution is to completely change the login page URL so that when someone tries to reach your login page they run into an impenetrable wall.

    In this way only authorized people or people you trust can enter your website.

    Remember passwords can only give you so much protection. Always strive to go that extra mile for your website security. Employ every trick in the book to make your website secure.

    Method 2: How to change WordPress admin password Via WordPress Dashboard

    This method applies if you’re still logged into your WordPress dashboard and need to change your password.

    A use case for this method can be if a user on your website has forgotten their password. You can use this method to send them the password reset directly.

    sent password reset email notificaiton directly to any user

    To reset your own password, you need to go to your WordPress dashboard and get to Users ===> Profile.

    navigate to user profile page

    Then scroll down to find Account Management and hit “Set New Password

    Create new password for your WordPress profile

    Just set a new password and scroll down to and click on “Update Profile”. Your new password will be updated. If you’ve done all the steps properly then you should see the “Profile update” message on top of your dashboard.

    Method 3: How to reset WordPress admin password from cpanel (phpMyAdmin)

    First and foremost, for this method, you must have access to your cPanel or database credentials.

    Now let’s say you’ve forgotten the credentials of your WordPress dashboard and now you want to recover the WordPress admin password. What can you do?

    If you’re short on time you can check out this short video on How to change WordPress admin password from the database.

     

    Well before doing anything you need to access the phpMyAdmin console. Now there are many ways to access phpMyAdmin for your website. Two of the most basic ways that most WordPress users are familiar with are:

    1. Accessing phpMyAdmin through the cPanel: Many hosting providers offer cPanel, which includes phpMyAdmin under the databases section. You can log in to cPanel, find the phpMyAdmin icon, and access it directly.

    Accessing phpMyAdmin through Cpanel

    2. Direct URL access: If you know the direct URL to phpMyAdmin on your server you can access it by navigating to this URL in your web browser and logging in with your database credentials.

    Now that you have access to phpMyAdmin let’s get started.

    Before you change any data on the database it’s generally a good idea to backup your data. Just click the export button and your pc will download and store the file just in case you need to revert the changes.

    Export Database before customization

    Now locate the wp_users file which can be different for different databases. For this one it’s Y40cNF_users. This is usually done for security purposes by WordPress hosts to make it more difficult for malicious attackers to crack the database.

    For an additional security measure, you can also consider hiding your WordPress admin URL. This way, even if someone stumbles upon your login page, they won’t be able to access it directly.

    Select the user whose password you need to change and then hit the edit button below.

    WP Users table in mySQL Database

    As you can see in the user_pass row, the passwords are encrypted. This is done so that not just anyone can get into your database and steal your credentials.

    To set a new password just enter a new password in the user_pass row and select MD5 from the dropdown menu. MD5 is the encryption algorithm WordPress uses to encrypt passwords.

    Select MD5 and Type User Password

    Now just hit save and your password will be reset!

    Save the Database

    There you go! Now you know how to use phpMyAdmin to change the wordpress admin password from the database.

    Method 4: How to change wordpress admin password by creating a new admin

    This method is intended for the more advanced WordPress wizard who is experienced with code.

    The point of this method is to create a new admin account so that you can gain access to your WordPress dashboard.

    You can check out this video below or the more detailed tutorial below. Which ever helps!

    After gaining access to your WordPress dashboard you can just use method 2 to reset any password you want.

    First go to your code editor using the cPanel or FTP and locate the function.php file.

    This is pretty simple. On the file manager on the left of your code editor just locate wp-content ===> themes ===> pick the theme you’re using ===> function.php

    Modify function php file of your active Theme

    Double click the functions.php file or right click and edit to get to the code editor. Now scroll down the last line of the code and add the following code snippet below:

    Add the code snippet to create WordPress Admin Account
    				
    					function add_new_admin_user() {
        $username = 'your_new_username';
        $password = 'your_new_password';
        $email = 'your@email.com';
    
        $user_id = wp_create_user($username, $password, $email);
        if (!is_wp_error($user_id)) {
            $user = new WP_User($user_id);
            $user->set_role('administrator');
        }
    }
    add_action('init', 'add_new_admin_user');
    
    				
    			

    Now save the changes and then go to the WordPress login and input the new username and password to login your dashboard.

    Created Admin account via WordPress Cpanel or FTP

    You can check that I just logged in with the default placeholder username and password.

    The WordPress Dashboard after creating Admin Account via FTP

    Final Thoughts

    Resetting or changing your WordPress admin password is a crucial task that every website owner or administrator should be familiar with.

    Whether you’ve forgotten your credentials, need to reset a user’s password, or want to create a new admin account for added security, the methods outlined in this article provide comprehensive solutions.

    From the straightforward forgotten password option on the login page to more advanced techniques like using phpMyAdmin or creating a new admin account via FTP, you now have the knowledge to regain control over your WordPress admin access.

    Remember, website security should always be a top priority, and using these password reset methods alongside other security best practices can help safeguard your online presence.

    Avatar of Roy Jemee

    Roy Jemee

    Jemee is a dedicated content creator, video producer, and Support specialist for WP Adminify plugin users. With a passion for keeping the community informed, Jemee shares valuable insights through blog posts and engaging videos. Need assistance? Jemee is here to help you solve any WordPress-related challenges!