I've recently started playing with Ghost CMS - if you haven't heard, this was a startup at a point in time, where John Nolan, quit WordPress because he saw it bloating too much (cannot disagree with that). He went on Kickstarter to seek crowd funding - today, is self-sufficient with no venture capital money, and sitting on US$ 5 million of funds.

One thing I like about Ghost is the ease with which you can publish (I've given up on WordPress after the Gutenberg update). Think of Medium - but you retain full control.

So after switching from WordPress to Ghost, there was definitely a learning curve. I for one have a bit of technical background in coding, yet even with my rusty skills, I'm sure that beginners will find this difficult to install. Which is why Ghost Pro is available, that avoids you having to tinker with a whole lot of stuff.

Anyways, when you start out trying to do it yourself i.e. self host Ghost CMS, it's very difficult to get going because even though there is a lot of information out there, all the geeks 'assume' you know what is what.

I would prefer a click here, type this sort of instruction. So that's why I attempt to share in my code section, which is for any Mac OS user. To get started, you'll need to be familiar with using Terminal on your Mac.

Installing Ghost Locally On Mac (For Testing Purposes)

There's a good set of instructions here to install Ghost CMS locally.

How to install and try Ghost Blog in your own computer
Choosing a suitable blogging platform can be daunting… How do we know if Ghost is a suitable blogging platform for us? The best way perhaps is to install Ghost Blog locally and try it out.
Strangely, the author is hosting this on Medium!

After following them, you'll need to follow the instructions below. In order to tinker with Ghost themes, you'll need Node (which powers Ghost), Yarn &/or Gulp to get started.

Step 1: Download and install Node.js LTS (latest version that you see here) → Node.js

After that open up Terminal.

To install the Ghost CLI (Command Line Interpreter / Interface).

sudo npm install -g ghost-cli

If you get the following error or something similar...

node.js - yarn error “EACCESS: permission denied, scandir ‘/home/ubuntu/.config/yarn/link’” - Stack Overflow

Try the following commands:

sudo chown -R $USER:$GROUP ~/.npm
sudo chown -R $USER:$GROUP ~/.config

Some themes require you to use Yarn or Gulp or both to build out the theme's CSS / Package. If that's the case, you'll need to install them locally as well.

Step 2: If you're installing Gulp for the first time, then follow the instructions here, or just open up Terminal and type the following in the CLI:

npm install gulp-cli -g

Step 3: If you're installing Yarn for the first time (& it's not on your Mac OS), then follow the instructions here, or just open up Terminal and type the following in the CLI:

curl -o- -L https://yarnpkg.com/install.sh | bash

If you're in the Ghost directory, and run the above command, and you get the following error (it's because you're in the wrong directory):

yarn run v1.22.0
error Couldn’t find a package.json file in “/Users/jpm/Documents/ghost”
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.

So some themes, will need building, here's how you do a build. First go to the theme folder using the 'cd' command

cd content/themes

Now, if you're you’re in the themes directory, and run yarn… (and you get the following error)

error Couldn’t find a package.json file in “/Users/XXX/Documents/ghost/content/themes”
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.

Then go to the name of the folder where your theme is… (in my case it was “jpm-master” change it to your theme directory folder)

cd jpm-master

Once in… give the following command, to compile the development file:

yarn dev

To ‘yarn’ aka compile the zipped package into a distribution file:

yarn zip
For some reason, I find that Yarn gives more errors that are the least useful to users, making it more complicated to work with. Follow these instructions to install on Mac OS.

After packaging your theme to upload to your Ghost installation, you can check whether your theme is compliant with all the Ghost standards. This will mostly rely on the developer who designed your theme, but just to check if you messed something up... upload your to check on G Scan.

Updating Ghost CMS through CLI

Every now and then, I check into the "About Ghost" section to see if there is an update.

While Ghost works as is, long after you've installed it. They do occasionally push major updates, and you get a notification. But if you don't, don't worry - just use Ghost without worrying.

I have to admit, this is really easy, once you know what you're doing. If you're using Digital Ocean - there is a link to "Access Console" which is basically your terminal into your Digital Ocean server.

ghost update

That's it.

And as a practice, I just type a command to display the version, so that the next time I log into the Access Console, I'm reminded of the version that is existing.

ghost version

And that's basically all you need to know about updating Ghost CMS. NO plugin updates every now and then, because its an all-in-one package.

Sometimes, you may need to navigate to the Ghost directory folder before doing the above, if so, use the following command (adjust for your directory structure):

cd /var/www/ghost

In the above command, "cd" comes from Unix command language and stands for 'change directory' i.e. you're trying to navigate to that directory.

Updating Node.JS through CLI

Sometimes, you'll need to update your Node JS to the latest version. I found this was possible with a simple command, however some times you might have to force the hand of the CLI!

npm update npm -g

But if you get some errors, don't worry try to force the update, with the following commands:

1) Clear NPM Cache

sudo npm cache clean -f

2) Install a little helper called 'n'

sudo npm install -g n

3) The CLI will question whether you're sure, no problem... go ahead!

sudo n stable

Ghost Resources Online

If you want to go further, here are some great places to start:

  1. Ghost Forum - most of my questions were answered there. Be patient, it's a small team but someone should have the answer to your question.
  2. Ghost Portal - came across this from Ghost Forum, hope it continues to build up, some nice themes to scour.
  3. Ghost-O-Matic - found some great tips for tinkering your Ghost setup.

If you’re editing ghost theme files in SublimeText, you might want to add the package to manage the code… makes reading easier: Handlebars - Packages - Package Control. While SublimeText is a paid editor, you can use it for free for as long as you like, just be ready to get a pop up from them asking you to register every once in a while. Support them if you use the software regularly.

UPDATE: I'll continue to update this page, as and when I get time and need to.