Reset WP Password Manually

Ever wanted to reset your password in WordPress, but for some reason or other you can’t use the reset password section? 2.5.1 has a bug where the reset password page doesn’t work, so this might be handy for you.

The phpMyAdmin way

Browse into the wp_users table in your database. Find your username and click on the edit icon () next to your username.

On the edit page, select MD5 from the Function dropdown next to the user_pass row. Change the value on the user_pass row to your new password and then hit Go.

Now log into WordPress with your new password and it will upgrade your password to the new phpass hashing.

The SQL query way

This applies where your database is wordpress and your login name is admin. Replace PASSWORD with whatever you want your new password to be.

UPDATE `wordpress`.`wp_users` SET `user_pass` = MD5('PASSWORD') WHERE `wp_users`.`user_login` = 'admin' LIMIT 1;

After you login on your WordPress installation, it will upgrade your password to the new phpass hashing.

Comments (14)

  1. Sara wrote::

    Thank you, thank you, THANK YOU! I just upgraded and when I went to log back in ran into this very problem!

    Sunday, April 27, 2008 at 1:16 am #
  2. Brian wrote::

    You’re a lifesaver!

    One thing – I think you might want ‘admin’ instead of `admin` (or so I found…) – otherwise, thank you!

    Brian

    Monday, May 5, 2008 at 11:11 pm #
  3. Kike Gavilan wrote::

    ¿Y no era mas fácil generar el password y reemplazar el de la tabla?

    Un saludo.

    Wednesday, May 7, 2008 at 3:48 am #
  4. Ben wrote::

    I also needed to change `admin` to ‘admin’. Otherwise I get this error:

    #1054 – Unknown column ‘admin’ in ‘where clause’

    Thanks Ryan McCue and Sara!

    :)

    B

    Monday, June 2, 2008 at 11:44 pm #
  5. Ryan McCue wrote::

    Ben and Brian: I’ve corrected this now, thanks.

    Kike: Unfortunately, I don’t speak Spanish :(

    Tuesday, June 3, 2008 at 4:18 pm #
  6. Thank you so much! Worked like a charm!

    I went ahead and changed my admin username to chris too, for added security!

    Thursday, June 5, 2008 at 12:35 am #
  7. Patrick D. wrote::

    Thank you! WordPress has been seriously NOT working for me on so many fronts since 2.5 rolled out.

    Tuesday, June 17, 2008 at 2:07 pm #
  8. Webbdesign wrote::

    Thanks it helped.

    Wednesday, June 18, 2008 at 2:13 pm #
  9. Momcat wrote::

    Thank you so very, very…v.e.r.y. much. I lost my cookies when I upgraded to Firefox 3 and was about to give up and do a fresh install/recreate my entire site there goes my day/::sigh:: when I found this. You made my day! >^_^<

    Thursday, June 26, 2008 at 12:06 am #
  10. kelly wrote::

    Omigod! You’re a LIFE-SAVER!

    Am linking my blog to yours so
    others will also know!

    THANK YOU and God bless!!

    kelly
    Singapore

    Monday, June 30, 2008 at 11:49 pm #
  11. islandercat wrote::

    thank you very much ! it’s useful!!

    Tuesday, August 12, 2008 at 3:12 pm #
  12. RiN wrote::

    Thanks a lot! ^^

    Tuesday, February 10, 2009 at 1:09 am #
  13. Dereck wrote::

    Bravo.
    Thanks for this info man, really really need it.

    Friday, June 19, 2009 at 8:34 pm #
  14. John wrote::

    After spending 4 1/2 hours of trying to log back in to WP, you solved my problem immediately. A MILLION thanks.

    Saturday, August 22, 2009 at 5:23 am #

Trackbacks/Pingbacks (19)

  1. [...] you are having issues with the reset link right now, you can read this post by Ryan McCue on how to Reset your WP Password Manually through phpMyAdmin. (No Ratings Yet)  Loading … Sphere: Related Content [...]

  2. Wp Wordpress » Blog Archive » Reset WP Password Manually on Sunday, April 27, 2008 at 8:25 am

    [...] you are having issues with the reset link right now, you can read this post by Ryan McCue on how to Reset your WP Password Manually through [...]

  3. Reset WP Password Manually | BlogBroker24-7 on Sunday, April 27, 2008 at 9:32 am

    [...] you are having issues with the reset link right now, you can read this post by Ryan McCue on how to Reset your WP Password Manually through phpMyAdmin. Share and Enjoy: These icons link to social bookmarking sites where readers [...]

  4. [...] my last post on how to reset your WordPress password manually, people have asked for the patch and the changed files for the bug in 2.5.1. I’ve grabbed [...]

  5. [...] your password, the login link you are sent doesn’t work and you end up locked out. You can reset a WP password manually, and here is a link to two updated files that fix this [...]

  6. [...] siempre podemos resetear nuestra contraseña de forma manual si no [...]

  7. Bug serio en Wordpress 2.5.1 | aNieto2K on Monday, April 28, 2008 at 4:28 pm

    [...] Siempre podemos acceder directamente a la base de datos para resetar la contraseña: [...]

  8. [...] er åbenbart en bug i Wordpress 2.5.1. Heldigvis er der en her, der har lavet et blogindlæg som viser, hvordan du kan ændre dit password manuelt via [...]

  9. Problème avec Wordpress 2.5.1 | Flux de la passion on Tuesday, April 29, 2008 at 2:28 am

    [...] Lire l’article chez >Ryan McCue [...]

  10. [...] mediante el acceso a las tablas de la base de datos del blog y se puede hacer, según leo en el blog de Ryan McCue’s de dos formas: vía phpMyAdmin y vía consulta SQL. De modo general y para que no hay algún listo [...]

  11. [...] is pretty much explained by Ryan McCue a 14 year old WordPress user & developer, it’s a manual way of reseting the password through phpMyAdmin. Finally, all those who don’t have the opportunity to access phpMyAdmin [...]

  12. 512 Links: Dejen de lloriquear niñitas on Thursday, May 1, 2008 at 2:06 pm

    [...] Resetear la contraseña de WordPress manualmente, para las chicas que soltaron en lágrimas al descubrirse el magno-agujero de seguridad de wordpress 2.5.1 que seguramente (valga la repetición) es tan grande que puede pasar un porta-aviones en él… obvio que es sarcasmo… [...]

  13. WordPress 2.5.1 + more fixes [builder2] on Thursday, May 1, 2008 at 9:50 pm

    [...] in the 2.5 series. But even just after 2.5.1, some problems were exposed, notably the one that requires you manually resetting your passwords because the password recovery links wouldn’t work as designed. The patched files can be [...]

  14. Bug encontrado en WordPress 2.5.1 | Goldscripts on Saturday, May 3, 2008 at 7:18 am

    [...] Tambi

  15. [...] you are having issues with the reset link right now, you can read this post by Ryan McCue on how to Reset your WP Password Manually through [...]

  16. 手动重置 WordPress 密码 - WordPress中文站 on Thursday, May 15, 2008 at 10:19 am

    [...] 这个 bug 将在 WordPress 2.5.2 中修复。然而,如果你现在就有这方面的麻烦,你可以阅读 Ryan McCue 的文章,通过phpMyAdmin“手动重置 WordPress密码”。此文为英文,感兴趣的网友可以翻译为中文。 [...]

  17. 手工重置wordpress2.5.1登录密码 | 畅想帮 on Tuesday, June 3, 2008 at 12:36 am

    [...] 事实上,手工重置wordpress登录密码并不是2.5.1版本的专利,只不过很多时候,通过email可以完成重置密码的过程。但是如果失败了,或者出于2.5.1特有的email重置密码bug,就需要参考Royan的这篇reset WP password manually了。下面的是部分译文:(我就直接本主题了,省略介绍部分) [...]

  18. [...] this qooool tip from cubegames.net saved me! Whew! [...]

  19. [...] via Ryan McCue [...]