Our developer hasn't been able to recover his password for the account he used to setup the site, and now he's non-responsive. The site is on my server and I have full access, but his account is the only one we setup.

We're not able to add new companies until we can either recover the account or setup a new one.

2 Answers 2

  1. Download and install a fresh copy of Craft from http://buildwithcraft.com somewhere (doesn't matter if it's the same computer your existing site is on or not).

  2. During installation, remember the password you entered when setting up the user.

  3. Open the database and look in the craft_users table. Copy what's in the password column for the user that the installer created over to the password column in the craft_users table for the site you're trying to recover.

  4. If the locked, suspended, pending or archived columns have 1 in them, set them to 0.

  5. If lockoutDate and/or lastInvalidLoginDate have values in them, delete them.

  6. Login to the site you're trying to recover with the password you created in #2.

  • This doesn't seem to work for craft 2.1.2564, is there a different procedure? Edit: It works fine ;)
    – maunoxyd
    Commented Jul 18, 2015 at 13:53

I'm rusty on MySQL so it took me a while to go through this. I'm leaving this here for future internet travelers. It's based on Brad's solution, so read through that first, then you can use these commands. If you forget what your database user/name is, go into Craft > App > Config > db.php

Login to MySQL on the command line:

$ mysql -u craftuser -p

Choose the corrrect database:

mysql> USE craftdatabasename;

Make sure that the tablename is craft_users (it might be just users if you didn't use a prefix):


Show what the current hash is (you'll want to do this from your local install as well to compare and be able to copy in the new hash)

mysql> SELECT username,password FROM craft_users;

Update it to the new hash:

mysql> UPDATE craft_users SET password='passwordhash' WHERE username='admin';

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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