When moving sites from one host to another, for example client sites, I have from time to time found that the user password gets corrupted after importing to the new database, resulting in an inability to login.
Why this happens is hard to say, but it could be anything from a poor export/import of the database backup to different versions of MySQL on the old/new host.
I’ll leave the reasons why to the experts, but here’s a quick rundown on how to fix the problem for you or your client.
Login to phpMyAdmin
After login to phpMyAdmin, select the database for your TXP install. You will see a list of the tables within the database. Then, select the txp_users column.
Finally, select the user in question as in the image below.
Change the password
Now that you are in the user’s record screen you may change the password. To do this, first select PASSWORD
from the pass field.
Then, select the current password text and enter your new password. Finally, press go and the record will be saved.
Go and login
Now that the password has been changed, you may go back to your Textpattern login screen and enter the new password.
Or…enter a SQL query
You may alternatively run an SQL query directly if you are comfortable doing so:
UPDATE txp_users SET pass=password(lower('pass')) WHERE name='user';
Change pass to reflect the new password, and make sure user is the correct login username.
More information may be found in TextBook.
Jonathan,
I never cease to be amazed at the coincidences I come across with Textpattern.
Haven’t had a need to reset a password before but your tip appeared in my life the day before I needed to use it in anger.
It looks like my client’s host has upgraded MySQL & consequently the password hashing has changed.
In my case it affected a user login not my admin password, so I was able to use rss_admin_db_manager to do the update.
Many thanks.
That’s exactly what happened to me last week when moving a site from one host to another – the login stopped working. This tutorial is a run through of how to solve the issue.
I never use rss_admin_db_manager but I guess its the same as using phpMyAdmin. Its installed on most hosts so I tend to just go with the flow.
Happy it worked for you!
Wonderful! This came in handy today when transferring a TXP site from Network Solutions to Hostgator.