InfoPhilic How to How to Reset WordPress Admin Password

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 the expert coverage he provides. In addition to writing for InfoPhilic, Amit loves to read and try new things.

Comment Policy: Your words are your own, so be nice and helpful if you can. Please, only use your real name and limit the amount of links submitted in your comment. We accept clean XHTML in comments, but don't overdo it please.


Please enter your comment!
Please enter your name here



Get almost 100% PageSpeed on Newspaper theme

The newspaper theme is the most popular premium theme for a self-hosted WordPress blog. The theme is developed by team tagDiv. You can buy...

How to Remove jQuery Migrate in WordPress?

Learn how to remove jQuery Migrate from your WordPress site.

How to Delete Multiple Images in WordPress Media Gallery

Hey, guys, today, one of my friends asked me a question, How can I delete Multiple Images in WordPress? I replied, "It's very simple." Yeah,...

WP Super Cache Plugin: Best Settings & Configuration Guide

A cache plugin serves static contents to the visitor, which improves page load speed. There are so many cache plugins available in the WordPress plugin...

How To Reduce Admin-Ajax Server Load In WordPress

To increase better user experience, we always end up by increasing site speed. After clicking a website link seems like a simple thing. But...


Astra Theme

Looking for a WordPress theme that's fast, elegant & customizable? Meet Astra! It's customizer powered, SEO friendly and compatible with major page builders.