levlaz

WordPress Password Reset Issues

2014-12-25 Tags: web wordpress

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.

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.