Sometimes We forget user names and sometimes we forget password. Well, last night when I loged-in to my locally hosted WordPress on my Computer I found I’ve forgotten my password. I asked my friend to fix that for me and I thought why not share with my readers How to change forgotten password from phpmyadmin.. though we can reset the password by email address, but in some cases we don’t have an email too.
Well, this is how its done.
Find the Password:
- Log in to your PhpMyAdmin.
- Select your WordPress Database
- Click on wp_users
- Select SQL tab from top navigation
- In “RUN SQL Query Database” box, some text will be already written as:
- SELECT * FROM `wp_users` WHERE 1
- replace WHERE 1 with a semicolon; – the code will now look like
- SELECT * FROM `wp_users` ;
- Press Go
A list with all usernames will generate. You can see password for every username next to it.
How to change the Password:
- Go back to same screen where to added semi colon.
- Replace all text with
- Update wp_users set user_pass = md5(‘password’) where id=1;
- ID = ID of the selected username
- password = enter your desired password
Now you can login back to http://yourdomainname/wp-admin/ with the new password.
Enjoy !
P.S:
Please don’t try to take advantage of this trick and change or see password of your blogging partners.
![]()
This post was written with the contributon of my coder friend Akram Kamboh. Who works at GEXTON as a Programmer and Developer.





June 25th, 2009 at 6:15 am
This is actually a really useful trick! But I would much rather get my password through email.
.-= Alex | Asnio.com´s last blog ..Design Trends in the Thesis Community =-.
[Reply]
June 25th, 2009 at 12:17 pm
Its really very useful coding. This is frequent problem. You have done nice job to share it.
[Reply]
June 29th, 2009 at 7:11 am
Interesting. I would probably prefer to use an easier method though.
.-= Jake _ Web Journey´s last blog ..Becoming the Perfect Commentator =-.
[Reply]
June 29th, 2009 at 12:21 pm
yeah right.. easier is better. but just in-case
[Reply]
November 8th, 2009 at 7:48 am
Great post!!
[Reply]