Installing Ghost in Windows

I had an unusually hard time installing Ghost in my Windows 8 64-bit system. Here are the steps I followed in case it helps anyone who is struggling to get Ghost up and running locally.

These instructions are for installing Ghost on Windows

If you are stuck anywhere halfway in your attempt to get Ghost up and running before you came to this post, abandon it and follow these steps one by one. Make sure you've done each step correctly.

Download and Extract Ghost

First, download the Ghost installer zip from https://ghost.org/download/ and extract it to an important folder (not a temporary location like your desktop). I am saying this because wherever this extracted folder is, that is where ghost will save all its data.

Don't execute any npm command yet! You will get an error when it tries to install sqlite3. I was stuck there for a  long time..

Install Visual Basic 2010

This is somewhat irritating. You have to download a 600 MB ISO file just to get Ghost running.

Install just Visual C++ 2010 Express.

Restart your system after your installation is complete.

Install node.js if you haven't already

Go to http://nodejs.org/ and install the latest version.

There is a bug in the Node.js 0.10.30 windows installer which means you may get the error “Error: ENOENT”, in which case you need to manually create the folder “C:\Users\%USERNAME%\AppData\Roaming\npm”

Install Python 2.7.x and GNUWin32

Go to https://www.python.org/ and install Python 2.7.x

Install GNUWin32 from - http://sourceforge.net/projects/getgnuwin32/files/getgnuwin32/0.6.30/GetGnuWin32-0.6.3.exe/download

Install sqlite3 from npm

This is the hardest step to get past. If you can get this step done, then you are almost there!

Now, set an environment variable called "NODE_PATH" to

C:\Users\YOUR_USERNAME\AppData\Roaming\npm\node_modules

Run "Node.js Command Prompt" as Administrator and run the command:

npm -g install sqlite3 --target_arch=ia32 --verbose

Success? Cool! Now try

npm install sqlite3 --target_arch=ia32 --verbose

You might get a few warnings, but just ignore it.

Install Ghost (Finally!)

In the node.js Command Prompt, Cd to the folder where you extracted the Ghost files in the first step. Run the following command..

npm install --production --target_arch=ia32 --verbose

If you followed the above steps correctly, everything should go smoothly.

Now download http://node-sqlite3.s3.amazonaws.com/Release/node_sqlite3-v2.1.a-node-v11-win32-x64.tar.gz and extract it somewhere.

Copy the folder called node-v11-win32-x64 from the above archive to ghost-x.x.x\node_modules\sqlite3\lib\binding

Now simply run

npm start

Voila! You have successfully set up Ghost. Wohoo!