There are a couple of reasons why you would like to change your WordPress admin password. Some of them may include:
- You want to change the password to a more robust one fortifying your admin area with more reliable protection.
- You believe that your admin account has been compromised, and you need to change the password immediately.
- You had a webmaster working and managing your website, and you no longer need his services, thus you need to change your administrative password.
- You have forgotten your password, and you have locked yourself from your administrative area.
- Any other reason you believe is relevant, and editing the admin password will ease your mind.
Knowing how to utilize different password-changing techniques provides you flexibility whenever one of the selected methods does not work for you or is currently unavailable for some reason.
In this article, we are going to explore four different ways of changing the admin dashboard password of your WordPress website. Two of them are easy and beginner-friendly, while the other two are more complex, however, are compelling alternatives you should aim to master. All of them are situational and you may find yourself using each of them based on your case.
Change your password from within your admin dashboard
This technique is by far the easiest and the most preferred way anyone would pick to change his admin password. To do so, however, you need to have access to your admin dashboard. Here are the steps:
- Upon logging inside your WordPress dashboard, please hover your mouse over the "Howdy, user" (user being the administrative username of your WordPress website) sign located on the top right corner of the screen.
- Hovering over the label mentioned above will expand a drop-down menu. From the provided options, please select "Edit my profile".
- Scroll down, and at the bottom, you will see the "Account Management" section. Underneath, you will find the "New Password" label and on the right the "Generate Password" button. Clicking this button will transform it into a text field containing a strong 24 symbol string that will represent your new password. We recommend using the one, however, you may type in a different password inside.
- When the new password is selected, please press the "Update Profile" button located at the bottom of the screen.
- You may now use the new password to log into your administrative WordPress area.
Using the "Lost your Password?" link on the login page
This method is ideal if you have forgotten your password, however, it requires you to have access to the administrative email address for the admin account. Here are the steps:
- Go to your WordPress admin login URL. This URL will typically be located at www.yourwebsite.com/wp-admin.
- Upon landing there, beneath the login form, you will find the "Lost your password?" link. Please click it.
- You will be redirected to the password reset page, and you will see a text field, requesting that you enter your username or administrative email address. Please type either of them inside the text field and click on the "Get New Password" button located below the text field.
- Doing so will send an email from your website to the administrative email that contains a link allowing you to change the password.
- This link will take you to a unique page that has a text field on it, asking you to type in the new password.
- Type the new password in and press the "Reset Password" button beneath the text field.
- When the form is submitted, WordPress will redirect you to a page with a message, saying that you successfully reset your admin user's password.
- You will notice a blue "Log in", button on the page. Please press it. This act will redirect you to your WordPress login page. Once you enter your username and the new password you have just set, you will be presented with the content of the admin area, and you can continue utilizing its functionalities.
Using phpMyAdmin to change your admin password
This method is a bit more complicated, and it requires you to have either cPanel access or phpMyAdmin access to your website's database. Here are the steps:
- Please log in to your cPanel account.
- Using the search bar on the right side, type in "phpMyAdmin", and when the result is presented, please click on it.
- This act will redirect you to the phpMyAdmin page. On the left side, you will see a list of all the databases on the account. Please press on the database which your website is using. If you are not sure which one it is, please, log in via SSH and navigate to the root directory of the application, using the Linux Command Line Basics. When you are inside, please run the following command:
grep 'username_' * -Ril
Here is an example:grep 'hostaramda_' * -Ril
The output will contain the database of your website. - When you select your database from the left side, all its tables will be displayed in the middle of the screen. Find the wp_users table and click on it.
- The page will refresh, and you will see all the users of your WordPress arranged in a column in the middle of the screen.
- Find the admin user and press the "Edit" button corresponding to the row where it is placed.
- You will be redirected to a page that has a table section. Find the row that has the "user_pass" label. On its right side, you will see a "varchar(255)" sign, and next to it, you will find a drop-down menu. Expand it and from the options select "MD5".
- Lastly, on the far side of the same row, you will find a content box, containing an encoded string. Detele it and type your new password inside. After you are ready, please click on the "Go" button located on the bottom right side of the screen.
- You may now use the password you typed in the content boxes to log into your WordPress admin dashboard.
Using the wp user update WP-CLI functionality
WP-CLI is an insanely handy tool providing a vast amount of functionalities that enable you to control all aspects of your WordPress website. You should check our article if you are interested in learning the basics of this robust feature.
To be able to use this technique, you need to have access to your cPanel account, and you also need to have basic knowledge of SSH commands. Here are the steps necessary to perform the password change when using WP-CLI:
- Log into your account using SSH.
- Upon logging in, please navigate to your WordPress root directory using the Linux Command Line Basics.
- After you reach your destination, please type in the following command in the terminal and press the “ENTER” key on your keyboard:
wp user update <username> --user_pass='<new_password>'
Here is an example:wp user update admin --user_pass='f*b5-qLLjvU2'
We recommend using this tool to generate a reliable password. - Upon executing the command above you should see the following output
Success: Updated user 1.
The integer value after "user" may vary based on the ID of the user in your database. - You may use the newly set password and log inside your admin area!