How to Reset WordPress Admin Password

In this guide, I will list all the four ways so that you can change or rest your WordPress Admin password.

Passwords are very important to user accounts, and there may come a time when you need to change your WordPress Admin password. Or, maybe you’ve forgotten it.

There are four ways to reset a lost WordPress admin password. So, in this guide, I will list all the ways to change or rest your WordPress Admin password.

Using the Lost Password option:

WordPress login screen | Lost your password?
WordPress login screen | Lost your password?

  • Open your WordPress administrative login page.
  • Click on the Lost your password? option.
  • It will ask you to input username or email id. Fill out the details and click on Get New Password.
  • Now, Check your email. WordPress will send you with the password reset URL there.
  • Click on it and enter your new strong password.
  • Now, Click Reset Password.

Reset password via phpMyAdmin:

Reset password using phpMyAdmin
Reset password using phpMyAdmin

  • Log into cPanel.
  • Go to Database >> phpMyAdmin.
  • Select the name of your WordPress database and click on the wp_users table.
  • Click on Edit beside your WordPress admin user.
  • In the user_pass field, paste your password.
  • Select MD5 from the drop-down menu.
  • Click on Go.
  • Once done, the page will show you a success message.

Consider reading: Best Guide to WordPress Database Optimization

Via FTP:

  • Login to your website via FTP.
  • Navigate function.php file.
  • In the 2nd line, paste the following command.

Here, we have set the ‘password’ as a password, and we’re updating it for the user admin.

Note: If you have a different username, you have to mention it in ‘admin’ field.

  • Upload this modified functions.php file back to your /themes folder on the server.
  • Now, log in to your dashboard using the password you set up.
  • Make sure you have removed the wp_set_password line from your local functions.php file. Doing this, WordPress will not reset the password every single time.

Via Emergency Password Reset Script:

WordPress has a PHP script that you can use.

Before using the technique,

  • Make sure, you know your user admin name.
  • It updates the administrator password and sends an email to the administrator’s email address.
  • If you don’t receive the email, the password is still changed.
  • You do not need to be logged in to use it. If you could log in, you wouldn’t need the script.
  • Place this in the root of your WordPress installation. Do not upload this to your WordPress Plugins directory.

How to use the script:

  • Copy & Save the script from Emergency Password Script as a file called emergency.php to the root of your WordPress installation.
  • In your browser, open
  • As instructed, enter the administrator username and the new password, then click Update Options. A message is displayed noting the changed password. An email is sent to the blog administrator with the changed password information.
  • Delete emergency.php from your server when you are done. Do not leave it on your server as someone else could use it to change your password.

That’s all, hope these four ways will surely help you in changing or resetting the password. For any kind of assistance, feel free to ask in the comment section below.

See Also:

Amit Malewar
Amit Malewar has been the tutorial writer since 2013. His passion for helping people in all aspects of technology flow through in the expert coverage he provides. In addition to writing for InfoPhilic, Amit loves to read and try new things.


Subscribe to our newsletter

To be updated with all the latest news, offers and special announcements.


Please enter your comment!
Please enter your name here