If you're like us, chances are, every so often you will forgot a WordPress Administrator password and you'll need to reset it. Luckily, WordPress has quite a number of ways in which you can change an Administrator (or any other user) password, of course as long as you still have access to the website via your hosting account.

Forgot Wordpress Password 

Change your WordPress password via phpmyAdmin

You can change the admin password if you have access to phpmyadmin. Browse to phpmyadmin using the database administrator and password which you should have available as part of your WordPress web hosting details

phpmyadmin to access Wordpress users table

Access the Users Table in phpMyAdmin 

  • On the left, you will see 2 links, click on the name of the database of the WordPress site you want to change the password 
  • Do not delete or change any of the tables if you do not know what you are doing.  You can potentially corrupt your database, lose information or delete your whole database.
  •  You will see all the table names are prefixed with some letters, e.g. wp_
  • The table names are on the right of the Underscore.
  • Scroll down to the table  wp_users
  • Click on the ‘Browse‘ tab

Change the Administrator Password

  • You will now see a list of users - you need to find the user which you want to change  the password for
  • Click on the ‘Pencil‘ or Edit to edit the WordPress Administrator user.
  • The next screen is where you can change your password, find the user_pass field:
    • Change the user_pass drop down to ‘MD5′
    • Enter in a new password in the text box beside it - you can enter it in plain text, the password will then be encoded by phpmyadmin

See the screenshot below of how your wp_users table should look like.  Then press Go.forgot Wordpress administrator password

Once you have done  this, your Wordpress administrator password is changed.  You will see on the next screen that the password field changed to a bunch of letters and numbers that you didn’t enter.  That’s ok, because that’s how MySQL stores your password. Don't forget this password too :)

Go to your Wordpress Administrator login and try out the new username and password you entered.

Change your password via FTP or the File Manager of CPanel

 You can also change the password by changing a file via FTP or using the CPanel File Manager. {googleads right

  • Access the files of your website via FTP or File Manager and edit the functions.php file of your currently theme
  • Edit the functions.php file and add the following to it, at the very top right after the first <?php
wp_set_password( 'password', 1 );
  • Change the 'password' text with your new password for the admin user. The reason why we put "1" is because the user ID number in the wp_users table of the Administrator is usually 1 - although sometimes it may not be the case. In that case you'd have to use the above method via phpmyadmin
  • Save the modified file back to your site - replacing the old version and access the front-end of your website, and make sure you refresh the site at least once
  • After refreshing, you should be able to login
  • VERY IMPORTANT: Make sure that you remove this code by following the same procedure. Besides being a vulnerability because the password is stored in plaintext, the code will reset your password each time you access your site until you remove it.

And these ladies and gentleman are the easiest ways to reset the WordPress adminstrator password if you forgotten it!

Download the list of 101 WordPress tricks every blogger should know

101 WordPress tricks

Click here to Download Now

One more thing... Did you know that people who share useful stuff like this post look AWESOME too? ;-)
Please leave a useful comment with your thoughts, then share this on your Facebook group(s) who would find this useful and let's reap the benefits together. Thank you for sharing and being nice!

Featured On

Inc Magazine Logo  

Sitepoint logo  

CSS Tricks logo   

webdesignerdepot logo   WPMU DEV logo   

and many more!



Get Started Now With Shutterstock




Best Rated Caching Plugin

Make your website faster 

Monstrous B-Day Party

CLICK HERE for discounts!

Monstrous bday party

How to make your website FAST!

Step-by-step - free email course, how to make your website load in less than 1 second 


The Outstanding HungryJPEG Bundles

AWESOMENESS! Bundles of premium font + graphic packs at more than 96% OFF!  Get a bundle for just $9 - ONLY!

The Hungry JPEG Awesome font bundles


Work with CollectiveRay.com

CollectiveRay (formerly known as DART Creations) is interested in developing partnerships with mutual benefit. If you like the stuff we publish and would like to develop a relationship, we'd be happy to hear from you. Go on - drop us a line - we'd love to hear from you :-)


Disclosure: CollectiveRay is funded personally out of pure passion for helping people working with websites. We do however generate some income through recommendations of products. This means if you click on a link and purchase an item we link to, we will receive a small sum out of that sale. We usually partner with vendors to make your purchase cheaper than buying direct.

who are we?

CollectiveRay is run by David Attard - working in and around the web design niche for more than 12 years, we provide actionable tips for people who work with and on websites. We also run DronesBuy.net - a website for drone hobbyists.

David attard

Follow us on Social

Follow us on Facebook   Subscribe to our RSS Feed   Follow us on Twitter


Where are we hosted?

This site is proudly powered by FAST VPS InMotion Servers and given an insane speed thanks to StackPath CDN!

Web Hosting stackpath