Yep, Casper got a little revamp too!

How to install Ghost 1.0-beta locally

Salvatore Laisa
Moebiusmania
Published in
3 min readJun 11, 2017

--

A quick tip for developers!

After months of hard work the team behind the Ghost blogging/publishing platform has finally released the first beta version of the 1.0 iteration of their software… and it’s simply amazing!

If you are a developer (or a very techy curious…) and you want to test it out on your machine for theme development or just to have a look, here’s the few steps necessary to quickly a local installation, first of all you need:

  • Node.js 6: the previous versions of Ghost (0.11.x) didn’t worked at all under v7 and since latest Node.js 8 caused some issues to me in the past few days I have reverted to Node.js 6 on my machine (remember that this version is LTS)
  • Yarn: suggested but not necessary, it’s a bit faster and easier than NPM and the Ghost team supports it too 😎. But if you don’t want to install for whatever reason remember that everything done with Yarn can be done with NPM as well.

Now we are ready to install the all-new-and-super-handy Ghost CLI, this is a new tools that streamlines a lot of process regarding Ghost workflow, including installing or updating a Ghost instance, so hands on the terminal and type:

$ yarn global add ghost-cli

now you can access to the ghost utilities command on the terminal!

To install a local version of Ghost we first need to create an empty folder and then use the CLI to work for us (assuming you are on MacOS terminal or Linux Bash or Windows 10 with Linux Bash):

$ mkdir mylocalghost
$ cd mylocalghost
$ ghost install local

with these 3 commands you will have your local copy of Ghost 1.0beta running on you machine in a matter of minutes! Just open your browser on localhost:2368 and you will see it with your own eyes!

A few notes before you go hacking your new Ghost installation

As a CLI tool, you can type

$ ghost --help

to have a list of available commands, you may noticed that “local” is not mentioned, if you dont add this flag the CLI will try to install Ghost as in production environment giving you some headache.

How did I discovered that? Here’s a tip…

Don’t be afraid to ask the community!

So, yes, there is a Ghost Slack channel if you want to reach the community, and as you can see usually they help you if you ask, just don’t be afraid!

And one really last note, beside using the CLI to start/stop your local Ghost instance, avoid to manually delete the instance folder but rather use

$ ghost uninstall

this will do a much nicer clean of the folder and data!

Happy hacking with the all new Ghost 1.0!

--

--

Salvatore Laisa
Moebiusmania

Lead Frontend Developer @ Contactlab, Kung-fu Viet Vo Dao, Tai-chi and last of the Time Lords :P