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:
- Make a text file with just the password
- Run the following command against the text file in order to hash it and copy out the output:
- Run the following query in the DB to update the password
update wp_users set user_pass="<your copied hash>" where ID=<user ID>
- 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. 🙂 Follow @levlaz