Forgot password in WordPress?

 In WordPress Tutorials

How to Recover a Lost WordPress Password

WordPress has a few ways to reset your password. Some of them are quicker than the others or may be more difficult. Everything depends on your skills and access that you have.

Resetting password in WordPress via FTP

  • Login to your FTP client and edit file functions.php in the theme.
  • Add this line after first <?php

    wp_set_password( 'password', 1 );password‘ – this is your new password
    1 – this is the ID of the user. You can check it using PHPMyAdmin. If you don’t have a possibility to do that check ID = 1. If you have only one administrator, there is a large probability that you will have luck 🙂
  • Go to https://yourwebsite.com/wp-admin and enter your username and password: password. You will not be signed into the back-end, but the login form will refresh.
  • IMPORTANT: do not try to log into to backend again.
  • Now reverse your changes in functions.php – just delete this new line. (Until you do that, the password will simply reset on every login attempt)
  • Now go back to https://yourwebsite.com/wp-admin and login again using password “password”.  This time round, you will have access to the back-end.
  • REMEMBER: change your password to something more secure

Recover password in WordPress by e-mail

This is the simplest way, and you don’t need any knowledge of PHPMyAdmin or FTP.
IMPORTANT: You need to know an email address for your user.

  • Go to http://yourwebsite/wp-admin
  • Now click on Lost your password?

    Recover password in WordPress by e-mail
  • Type your username or email address and then click on Get New Password.
  • You will get similar email message:
    Click on this link at the end of the message.
  • You will be redirected to the page where you can use generated by WordPress password or use your password. Click Reset Password when you are done.

Reset password in WordPress via PHPMyAdmin

This method is useful when we also don´t know the username.

  • Go to PHPMyAdmin
  • Select the correct database on the left-hand side. You can find database name in wp-config.php file. There will be a line:define('DB_NAME', 'database_name');

    database_name
     – name of your database
  • Now select table prefix_users, usually wp_users:Reset password in WordPress via PHPMyAdmin
  • You will see there is also username if you forgot it either 🙂 It’s stored in field user_login.
  • Click on Browse: 

  • Now click on Edit icon next to your user:
  • You will see fields like these:
    Take a look at field user_pass. There is a MD5 encrypted password. You need to generate your new MD5 password.
  • Type your new encrypted password into user_pass field.
  • Click on Go when you are done.
Recent Posts
Contact Us

We're not around right now. But you can send us an email and we'll get back to you, asap.

Not readable? Change text. captcha txt