Bart Simons

unlock

A 1 post collection


Unlock a Ghost blog account

 •  Filed under ghost, ghost.org, unlock, account

Bummer! You've just locked yourself out of your Ghost blog account, right? Well, it happened to me a while ago after I've mistyped my password 5 times. Could happen to anyone, right? Here's a nifty little trick that may help you if you don't want to go to the process of resetting your password and/or if you want to keep your current password.

First things first: you need to have access to a shell on your server. I use SSH for that. Once you have shell access to your server: stop all possible Ghost processes. This is important, because you don't want to modify a database that's active and/or in use!

If you use SQLite as your database backend (it's the standard setting, so if you don't know what database backend you have, use this) you need some sort of a SQLite client. You can install one via apt-get:

sudo apt-get install sqlite3  

Navigate to your ghost.db file, you can find this file within the content/data folder inside your Ghost installation path. Then, execute this command to enter into a SQL shell:

sudo sqlite3 ghost.db  

Now, the only thing you need to do yet is updating the status of your account. Execute this inside the SQL shell:

update users set status = "active" where "slug" = "insertyourusernamehere";  
.exit

Start your Ghost instance again, and voila: you can login again!

In case if you are using any other SQL-compatible database to run your Ghost blog: just execute the query inside the correct database and you will be able to login as well.