How To Fix WordPress 2.5.1 “Invalid Activation Key” Bug (Occurs When Resetting Password)
- Sunday, July 6, 2008, 15:50
- Archived Blog Posts
- 483 views
- 10 comments
I’ve been battling with a Spin Of Death problem on my MacBook anytime I start Firefox 3, and today, as a last resort, I completely removed Firefox including my user profile.
Problem was, I didn’t remember any of my passwords stored in Password Manager. And when I tried resetting my password on one website running WordPress 2.5.1, I was greeted with a friendly “Invalid Activation Key” message whenever I clicked on the confirmation mail.
No matter how many times I tried, I always had the “invalid activation key” problem.
Digging around the WordPress support forums, I discovered this is a known bug in WordPress 2.5.1, and has already been fixed in Ticket #6842.
If you’ve also encountered this “invalid key” problem while trying to reset your WordPress 2.5.1 password, here is how to (hopefully) fix it:
First, Apply The Patch
Head over to Ryan McCue’s Blog, grab his patched files (zipped file containing two files: wp-login.php and wp-includes/pluggable.php), and upload them to your WordPress installation directory, overwriting the existing files.
Alternatively… and this is only for the really adventurous… you can upgrade to WordPress 2.6 Beta 2 to enjoy all those cool new feature. Sure, this is beta and it’s not ready yet, but I’ve been running both the first and second betas with no issues at all. Yet.
Hopefully you should be able to generate a password after applying the patch. But if you still get the “invalid key” message…
Clear The Activation Key From “wp-users” Table
For some users, just applying the above ptch will fix this problem. But for others (myself included), this patch appears not to help at all.
But this patch actually works… except it appears that if the “wp_users” table already contains an activation key, it is not cleared before a new one is generated after installing the patch; thus, the patch appears to not work.
This seems to be the case even after upgrading to WordPress 2.6 Beta 2.
So what you gonna’ do? After installing the patch, you need to manually dig into the WordPress database and remove any activation key from the wp_users table and try the password reset again. You can do this by using your database management tool such as phpMyAdmin.
This worked for me, and I hope it works for you too. As always, just let me know if you need help with this… I’d be grad to help you.

About the Author
10 Comments on “How To Fix WordPress 2.5.1 “Invalid Activation Key” Bug (Occurs When Resetting Password)”
Trackbacks
Write a Comment
Gravatars are small images that can show your personality. You can get your gravatar for free today!


I just wanted to say thank you, thank you, thank you! My client’s blog had this issue and I couldn’t have fixed it without you!
Thanks!
Glad you found my website useful. Always at your service.
Thank you!
Thanks !
Thanks! I just found out about this, the hard way!
Tip: If you have a lot of users like I do, you can enter this in phpMyAdmin’s SQL Query box to clear them all out at once:
UPDATE `wp_users` SET user_activation_key = ”
Hi,
I am, Steven
great posts on here
check out my site:
http://HOWCf60P.spaces.live.com/
i’ve been trying to update my 2.5.1 wordpress to a 2.6.7 but in the process, i accidentally delete my wordpress. its okay if i lost all of my previous posts but i’d like to get my blog back. how should i fix this problem?
thats a heck of a hack ..
thanks, now, that i can reach the last (and almost forgotten) blog, i can upgrade it to 2.7.1
thanks a mil for posting info on how to fix this issue!