How to Manually Change WordPress Password

Last Updated on

How to change wordpress password
Share on facebook
Share on twitter
Share on pinterest

So you can’t change WordPress password via password reset link?

Or you do not remember the right username and password you used during installation.

No problem, because you’re about to learn how you can manually change WordPress password of any user be it an administrator.

WordPress as always has got an awesome guide on resetting or changing your password. You can check it out here.

Nonetheless…

I like to break it down and make life a bit easier for the beginners here.

Let’s get started!

Change WordPress Password from phpMyAdmin

Can you access cPanel?

Great!

Locate and click on phpMyAdmin from your cPanel to start the program.

Follow these steps to quickly reset WordPress password:

1. From phpMyAdmin, find and click on the WordPress database name.

In case you do not know the database name being used by WordPress, open wp-config.php file and look at ‘DB_NAME’ value.

2. Choose {prefix}_users table. For example wp_users but prefix can be anything else.

3. Find the user you want to change their password and click on “Edit” link.

4. Type the new password in the “user_pass” column and then choose MD5 from function dropdown.

5. Click “Go” button to save changes.

That is it!

Did you notice how the password changed from what you actually typed to some random string?

You don’t have to memorize that weird string, just remember what you typed in before as your password.

You’ve just changed that user’s password and you can now login using the new password you typed – not the one that it changed to after saving.

Still don’t understand well?

Why not watch this video that will clear things for you?

Change WordPress Password from FTP or File Manager

Assuming you having nothing else but FTP login credentials for the WordPress website you want to reset the password for.

Login to the server via ftp and follow these steps to reset or change your WordPress password.

This works even when you can get to file manager without using FTP.

1. Find functions.php file under wp-content/themes/{them-folder}/functions.php

2. Edit the file and add this code to it, right at the beginning, after the first <?php:

wp_set_password( ‘newpassword’, 1 );
Replace ‘newpassword’ with your preferred password.

“1” is the id of the user you’re changing the password for and user “1” is usually an admin so it’s reasonable to leave it as 1 unless otherwise.

Don’t forget to save the functions.php file after adding the code above.

3. Visit the website url. This makes the code you just added run and change the password.

That is it. You should now be able to login with the new password.

You can now go back to the functions.php and remove the line of code you just added.

Well…

What if when you don’t remember both the username and password?

Yes, when you can’t remember both and you can’t get to phpMyadmin!

Good question.

You can create a new admin user via FTP.

Kuttler has a great code snippet here. Check it out!

So, there you have it.

Different ways to change WordPress password when your memory can’t help.

Let me know which one worked for you in the comment section.

Is it from phpMyAdmin or via FTP or Kuttler’s supper snippet?

Share your thoughts in comment section below.

Related Posts

Get Free WordPress Checklist

Going to launch? Here’s a full WordPress checklist for a successful launch!

Share this post with your friends

Share on facebook
Share on google
Share on twitter
Share on linkedin
Daniel Emunot

Daniel Emunot

Over 5 years ago, I had no idea on how to use WordPress. Now I professionally build websites for my clients using WordPress. Over the past years I have gained experience and therefore, I spend my spare time writing articles that help beginners skip the Jibber Jabber and quickly start launching websites in the shortest time possible.

Leave a Comment

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