Articles on: ​Web Hosting

How to reset your Wordpress password

This guide details three ways to reset the password for a WordPress user account.

The first should be used when you know the username or email address of the user account you are trying to reset. This is the easiest and preferred method.

The further methods are more technically involved and not recommended if you're not completely sure of what you're doing. Changing things in the WordPress database directly can break your site. Please ensure you know what you are doing and have backups of the site, including the database in case something goes wrong.

The second method involves changing the account's password within the MySQL database associated with the site and the third method is using WP-CLI via SSH to reset a users password.



In order to use this method you need to know the username or an email account associated with the account for which you wish to reset the password.

Visit the sites wp-admin page e.g. www.mysite.co.uk/wp-admin

Click the Lost your password? link



Enter the username or email address of the user and click the Get New Password button.



If you enter a username - the email will be sent to the email address associated with that username - so you should have access to that mailbox.

The email you receive will contain a link to reset your password - click the link



WordPress will automatically suggest a new strong password - feel free to change it, but take note of any password requirements specified.

Once you've made a note of the password, click the Reset Password button. You should now be able to login with that username/email address and password.

The following methods require access to cPanel or SSH shell access for the hosting account - they should only be attempted if you know what you are doing and are sure you have a backup of the full site & database in case anything goes wrong.

Resetting an account password in the database



We have a separate guide that covers resetting your WordPress password using phpMyAdmin (Internal link opens in new tab)

Use WP-CLI to add a user or reset a password



You'll need shell access to the account containing the WordPress install. We have articles on accessing SSH on your server for both Windows and Mac clients.

SSH access is available on all Krystal plans apart from Amethyst.

Using your chosen terminal application connect to your hosting server, either with it's home server name, your domain name, or the server's IP address.

Once you've gained access, navigate to the directory containing your WordPress install - often this will be public_html

You can now use WP-CLI commands to make changes to your WordPress install.

To list the current user accounts:

wp cli user list


Once you've established the username you can reset it's password with:

wp cli user update username --user_pass=


Where username is the user whose password you'd like to change, and <new password> if the password you'd like to set.

WordPress.org has a full online command reference for WP CLI (external link opens in a new window).

*

*

Updated on: 24/01/2024

Was this article helpful?

Share your feedback

Cancel

Thank you!