4 Ways to Change WordPress Password

Almost all WordPress users will get locked out of their WordPress dashboard at some point. This post will teach you how to change your WordPress admin password in four different methods.

There are at least two scenarios in which the administrator may need to reset their WordPress admin password. It’s either that they change their password as part of their usual security practises, or they’re locked out of their WordPress dashboard.

If the user is already signed in, the user Profile page gives a simple way to change the password. It is the easiest way for changing the WordPress password.

4 Methods to Change WordPress Admin Password

1. Reset WordPress Pass from Profile page

The user profile page is the easiest way to change a WordPress user’s password. This requires the user to be signed in to their WordPress dashboard.

Go to Users > Profile.

WordPress user profile
WordPress user profile

Scroll all the way down to the Account Management section. Click the ‘Set New Password’ button. Typically, people create their own passwords, which bots may easily guess. I recommend using this option to generate a more complicated password that bots will find difficult to guess.

WordPress profile set new password
WordPress profile set new password
WordPress profile create password
WordPress profile create password

Finally, click ‘Update Profile‘ button to update the password.

Although this is the simplest technique for changing your WordPress password, it is not always available. If a user is locked out of their account, for example, because they forgot their password and are unable to receive forgot password emails, the administrator will need to use alternate methods to change their WordPress password.

2. Reset WordPress password using phpMyAdmin

phpMyAdmin is a popular database management tool for MySQL. Most web hosting providers offer phpMyAdmin, which allows customers to access their databases from a web browser.

phpMyAdmin may be accessed through your hosting cPanel. If you have a VPS without cPanel, you may instal and configure phpMyAdmin on your own. The configuration, however, needs significant expertise and is only advised for advanced Linux users.

If you are not technically savvy, please utilise the third approach to connect to your WordPress database using alternative database administration tools.

When you log in to phpMyAdmin, you will see all of the databases.

phpMyAdmin
phpMyAdmin

Select your WordPress site database to view all its tables.

phpMyAdmin select wordpress database
phpMyAdmin select wordpress database

WordPress maintains user information such as username, email, and password in the ‘wp_users‘ database. So choose the ‘wp_users‘ table.

wordpress users table
wordpress users table

The following screen will now appear. All of these columns’ fields include important user’s data. For instance, user_pass is the column containing the encrypted password. To update your WordPress password, enter your password in the ‘user_pass’ column and choose MD5 from the drop down selection.

Now scroll down to the bottom of the screen and hit Go.

Change user password from phpMyAdmin
Change user password from phpMyAdmin

Some of you may be asking why I choose MD5. I am aware that MD5 is an unsafe algorithm that is no longer used to encrypt passwords. Until WordPress 2.5, passwords were encrypted using the MD5 method. WordPress has been utilising a more secure algorithm for password encryption since version 2.5, but it still retains backward compatibility, so it can identify MD5 hashes and re-encrypt the password with the safe algorithm.

As soon as you log in to your WordPress dashboard, WordPress will re-encrypt your password using a more secure technique.

3. Use Other Database Management Clients

The most common web-based database client for managing MySQL databases is phpMyAdmin. We can utilise different database administration solutions for users who do not have cPanel access or do not have the knowledge to set up phpMyAdmin on their own.

  • dbeaver community
  • Beekeper studio
  • Emma

The above three database management tools will allow you access to your database remotely. Once you connect to your WordPress database remotely, follow the same steps as I mentioned in the phpMyAdmin section. Change the user password from wp_users table.

4. Reset WordPress Password from MySQL command-line

MySQL is the most widely used relational database management system. phpMyAdmin and other database administration utilities are graphical tools for managing MySQL databases, however we may also manage MySQL databases using the MySQL client (command-line tool).

Check that the server has mysql-client or mariadb-client installed. If not, please use your Linux distribution’s package manager to install mysql-client or mariadb-client.

Once installed, use the following command to access the MySQL command-line interface:

mysql -u username -p

You will be prompted to enter your user password. The username and password can be obtained from the WordPress configuration file, wp-config.php, which is located at the root of the WordPress installation.

You may use database queries after logging onto the MySQL command line to select/alter databases, tables, columns, and so on.

We updated the user field user_pass above to change the WordPress password. Now we’ll perform the same thing but with MySQL command-line.

Select WordPress database

First, we must select the WordPress database. If you run multiple WordPress sites on the same server, you may have databases that appear the same. Make sure you’re picking the proper database.

use wordpress-database-name;

Update the user_pass for the WordPress username

Now we can select the username and alter the value of the field ‘user_pass‘ to anything we want. We can encrypt it using the md5 option before storing it to the database. We will discover the individual user by its username in the next command; if you don’t recall the username, use the following command to show all WordPress users.

SELECT user_login from wp_users;

The above command will list all the users login “username” and you can find the one that you need.

Finally, update the user password with the following command –

UPDATE wp_users SET user_pass=MD5('new-password') WHERE user_login = 'username';

That’s it. We can now safely exit from the MySQL command-line.

exit

We can now access our WordPress dashboard with our freshly created password.

Conclusion

These are the four options for changing or resetting your WordPress password. You can change the password depending on your degree of experience and the circumstances. If you’re using the mysql command-line, be sure you’re altering the right column in the right database.

SHARE THIS POST

MassiveGRID Banner

Leave a Reply

Your email address will not be published. Required fields are marked *