How to unlock account of Ghost blog.

After logging via wrong password your account may be locked and if you haven't config your email which makes forget password work, you will never login to your dashboard forever.

But there is something we can do, that is, changing your password and unlock your account directly in database.

  1. Find your db file in the location where Ghost has installed. Assume that it's /var/www/blog/ghost;

  2. The db files should be in /var/www/blog/ghost/content/data;

  3. Install Sqlite3 if you haven't done this before:

sudo apt-get install sqlite3

  1. Open database via sqlite3. Note that if your blog runs under production environment, you should open ghost.db and if it's running under dev environment you should open 'ghost-dev.db':

sudo sqlite3 ghsot.db;

  1. Check your account:

select * from users;

Now you should see that there is one account which status is lock.

  1. Generate your BCrypt Hash password via http://bcrypthashgenerator.apphb.com/

  2. Update password:

update from users set password="$2a$10$ImM7dqlGczqWk2gNFRP0tuXh6I0nTDxFbwv57tNEqDOAkcC/odICa" where id=1;

Note that the operation below changes password into test.

  1. Update your account status into active:

update from users set status="active" where id=1;

Now with correct email and password, you should login into your dashboard successfully.