Reset Wordpress Password using PhpMyAdmin and Mysql

Today somehow MWolk Blog which runs on wordpress stopped accepting the login/password for some strange reason. Normally I save the login password in firefox password manager as well as always checkmark the “remember the password” option but somehow wordpress was giving me error that password is not correct.

Now the problem is, my host has also disabled mail() function so it wasn’t possible for me to reset the wordpress password by entering my email. So I have to use the MySQL and PhpMyadmin to reset my wordpress password.

Here is a step by step guide on how you can reset your Wordpress Admin password using mysql and PhpMyAdmin -

1. Login into your phpmyadmin panel and select the database of your blog.

2. Now you can’t recover your password, you only reset it to something else, so lets say you want the new password to be “mwolkblog”, go to this page and enter your password in first line, it will convert it into different strings based on various algorithm, you only need the 3rd string, the MD5 one.

You see, wordpress do not store passwords in simple strings but in MD5 hash so here we are converting out password into MD5 string.

3. Now click on sql tab in your phpmyadmin prompt so we can run our sql query to rest passwrod.

and Enter this -

UPDATE wp_users SET user_pass="c4ca4238a0b923820dcc509a6f75849b" WHERE ID = 1

ofcourse for you, the user_pass string will be different (it will be your MD5 key which you got from step 2). Once you click go, the sql query will get executed and your password will be reset.

Now you should be able to login into wordpress with new password.

Edit - Ok I missed a simple trick here, you can simple use this sql command

UPDATE wp_users SET user_pass= MD5 ("mwolkblog") WHERE ID = 1

so you even don’t have to convert the password into MD5

Another way to Reset your Wordpress Password -

I just found another way of resetting wordpress password thanks to Otto -

You can go to functions.php file of your theme and put this line

wp_set_password(’mwolkbloc’,1);

which changes the password of userid 1 and make it mwolkblog, then after logging to your wordpress blog, you can change the password. Do not forget to remove this line from functions..php too.

Related posts:

  1. Linksys Default Password The Linksys router’s default password is “admin”. If that password...
  2. Import Export Mysql Dump Files Most of the host keeps 2 MB or 5 MB...
  3. Reset BIOS Password When your computers boots up, the BIOS may something ask...
  4. Get MySQL ODBC Driver MySQL provides standards based ODBC drivers for all programmers to...
  5. Change Hotmail Password If you have found that you need to change your...


Liked this post ? Subscribe to MWolk Blog via RSS Feed or via Email and receive free daily Tech and Money making tips.

2 Responses to “Reset Wordpress Password using PhpMyAdmin and Mysql”

  1. 1zahoor ur rahman on Sep 2, 2009 :

    Thanks to every how write the method change of admin password in wordpress

  2. 2Mathias on Jul 26, 2011 :

    If you want to recover your original password without resetting it read this article: http://www.cedricve.me/blog/2011/07/25/how-to-recover-a-wordpress-password-without-resetting/

Leave a Reply

Name Email Website URI