WordPress Password Reset Issues

I have been having some weird WP password issues lately. To top it off I was not getting any of my email since I migrated my site to a new server.

All of this is probably my fault because in the last month I have.

  • Migrated the site three times to three different servers
  • Changed the entire domain name (from .co to .org)
  • Migrated once again

For some reason, I was not able to reset the password in the DB. Assuming you are running Linux, for what its worth the process should be something like:

  1. Make a text file with just the password
  2. Run the following command against the text file in order to hash it and copy out the output:
    md5sum password.txt
  3. Run the following query in the DB to update the password
    update wp_users set user_pass="<your copied hash>" where ID=<user ID>
  4. Log in and enjoy your life.

I am not too sure why that didn’t work. To make matters worse, somewhere in the mess of migrations my password reset emails stopped working as well. Luckily, I was able to figure this out. It looks like I was using exim4 as my Mail Transfer Agent, and I saw in the logs that it was complaining about non-local deliveries. Specifically it was saying: Mailing to remote domains not supported

This is an easy fix. In debian you simply need to run sudo dpkg-reconfigure exim4-config and set it up as an Internet site. I was then able to get the password reset and everything is well in the world again.

If you made it this far, you should probably follow me on twitter. 🙂

This entry was posted in Hacking and tagged . Bookmark the permalink.

Leave a Reply

Your email address will not be published. Required fields are marked *