0

I ashed a question How to make Wordpress independent of hostname recently, and followed the advice by editing the mysql details.

This seemed quite successful and the Wordpress installation seemed to work.

I wanted to run wp-admin but could no longer login with the password.

I note passwords are stored in the database encrypted, so I guess this may involve the hostname.

My question is how can I reset/modify the password? There is a option to reset password by email, but this could not send an email (email probably never been used)

  • 1
    Changing the hostname does not invalidate existing passwords, only cookies. Something else is wrong. If you missed a spot updating the name it may try to log you in to the old location, which fails, but otherwise I'm not sure what that would be. – Michael Homer Jul 30 at 6:40
  • You can just use phpmyadmin and enter a new password using MD5 function. Quick research yields a lot of howto's. – pLumo Jul 30 at 7:09
0

I don't know what happened to the password (possibly it didn't work because it is salted) but I managed to reset with the following:-

Run mysql with sudo mysql -u root -p enter password

use wordpress;
SELECT ID, user_login, user_pass FROM wp_users;

Note ID of user

run

UPDATE wp_users SET user_pass = MD5('password') WHERE ID = 1;

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.