How to Change WordPress Password through PhpMyAdmin

Mon, Jun 22, 2009

Wordpress

How to Change WordPress Password through PhpMyAdmin

Change WordPress Password from PhpMyAdmin

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. :D

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.


Related posts:
  1. How to Change the Default Gravatar in WordPress
  2. Post more ?
  3. WordPress Responds to Attack: “Please Upgrade”

,

This post was written by:

Enk. - who has written 88 posts on Wordpress Tutorials.

I'm one of the Administrators of CHIDIMAR.com. I also own I'm Enk.. I'm 18 years old Blogger and Graphics Designer looking for Freelance work. You can follow me @enked

Contact the author

5 Comments For This Post

  1. Alex | Asnio.com Says:

    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]

  2. Morgan | r4 Says:

    Its really very useful coding. This is frequent problem. You have done nice job to share it.

    [Reply]

  3. Jake _ Web Journey Says:

    Interesting. I would probably prefer to use an easier method though.
    .-= Jake _ Web Journey´s last blog ..Becoming the Perfect Commentator =-.

    [Reply]

  4. Enk. Says:

    yeah right.. easier is better. but just in-case ;)

    [Reply]

  5. Jo Hurley Says:

    Great post!!

    [Reply]

Leave a Reply