How To Reset WordPress Admin Password
Quick Navigation Links
How do I reset my WordPress admin password?
You can reset your password several ways. It can be changed in your WP admin dashboard, from the admin login page or by changing it in your database. It will depend on if you just want to change it or if you’ve lost it and need a new one.
It will also depend on if you have access to your WP admin dashboard or if for some reason you can’t access it.
How do I change my WordPress password?
Through the dashboard
If you can log into your WP admin dashboard and just want to change your password, go to Users on the left side. Choose to edit your user and towards the bottom there’s an option to generate new password. Save your changes.
From the login page
If you’ve forgotten your password and can access the admin login page, just click the “Lost your password?” and you’ll be emailed a link to change your password.
If you’ve lost your password and you can’t access your dashboard or login page, don’t fret. You can still change your password.
- Login to cPanel
- Go to phpMyAdmin under the Databases section
- Click the name of the database for your WP installation (If you don’t know which one it is, you can find it in your wp-config file)
- Click on the wp-users on the left
- Find your admin user and click edit
- Paste in your new password
- Choose MD5 from the dropdown
- Click Go
Change WP password using FTP
If you don’t have access to any of the above, you can also change your WordPress password through FTP.
- Login with FTP
- Find and download the functions.php file – normally in public_html/wp-content/themes/nameofyourtheme
- Right at the top directly under the <?php, add this: wp_set_password(‘password’,’admin’);
- Change the password on that line
- Upload it back and replace the original functions.php
- Try to login to your WP admin dashboard
If successful, remove the line you added above on the functions.php file and reupload it again.
WordPress emergency script
If all else fails, there’s actually an emergency script that can be used. You’ll need to know what the admin username is.
Download emergency password script here.
- Create a file in the root folder where WordPress installed called emergency.php
- Copy the script into this file
- In your browser, go to yoursite.com/emergency.php
- Input the admin name and the password you want to use
- Click update
You should get an email, but even if you don’t, the password should still be changed. Try to login to your admin dashboard. If it works, make SURE you delete the emergency.php file that you created or anyone can come along and change the password.