How to install Ghost CMS onto your local machine easily?

Getting started with Ghost CMS? Want to know how you can install Ghost to your local machine? Why wait? Let's get started.

How to install Ghost CMS onto your local machine easily?
Ghost is an open-source blogging platform developed using the modern tech stack NodeJS. Ghost is more suitable for creating blogging and membership sites than a full-fledged website [atleast for now].

Ghost platform is free to use. You can self-host Ghost on your own server, but you can't expect support from the Ghost team.

You can also use Ghost's hosting, the cost of which starts from 9$ a month. [Which is great for personal bloggers]

In this article, we're gonna see the steps required to run Ghost locally.
[Which I found it difficult to understand when I'm creating this website]

Let's get started with Ghost local installation

  1. Install Node latest version from https://nodejs.org/en/.

  2. Verify the Node and NPM package version by running the node -v code on your terminal.

C:\Users\user>node -v
v14.17.0

Then run the code for NPM - npm -v

You sould see the following response.

C:\Users\user>npm -v
7.16.0
  1. Now, install Ghost CLI by entering the following code in to terminal.
C:\Users\user>npm install -g ghost-cli@latest
  1. Now verify the successful installation of your Ghost CLI in your local machine and its version using ghost -v.
C:\Users\user>ghost -v
Ghost-CLI version: 1.17.3
  1. You've successfully installed Ghost CLI on your local machine. Now, it's time to install Ghost using Ghost CLI.

We have to create a folder where we can install Ghost.

  • Type in cd Desktop on your terminal.
  • Create a folder named Ghost on your desktop by entering mkdir ghost
  • Now you'll be in the 'Ghost' folder
C:\Users\user\Desktop>cd ghost
  1. Finally, install Ghost on to the folder by using the command ghost install local.

  2. After a successful installation, you'll see a message like this.

You'll get something like this on your screen now.

C:\Users\user\Desktop\ghost>ghost install local
√ Checking system Node.js version - found v14.17.0
√ Checking current folder permissions
√ Checking memory availability
√ Checking free space
√ Checking for latest Ghost version
√ Setting up install directory
√ Downloading and installing Ghost v4.6.4
√ Finishing install process
√ Configuring Ghost
√ Setting up instance
√ Starting Ghost

Ghost uses direct mail by default. To set up an alternative email method read our docs at https://ghost.org/docs/config/#mail

------------------------------------------------------------------------------

Ghost was installed successfully! To complete setup of your publication, visit:

    http://localhost:2352/ghost/
  1. Copy and paste the URL [http://localhost:2352/ghost/] into your browser.

  2. You will be displayed with the Ghost admin screen.

  3. Create an account in Ghost.

Ghost-create-account-screen

  1. After creating your account, you'll be directed to the admin dashboard of your Ghost website.

Admin-dashboard-of-Ghost-CMS

We have installed Ghost on the local machine and logged in to the admin dashbaord. But is it possible to customize the theme?

Yes, you can!

But for that, you need to install YARN on to your theme folder.

  • Go to your theme's folder on your command line.
C:\Users\user\Desktop\ghost\content\themes\casper>
  • In this folder, enter the code yarn install.
  • You'll get something like this. [Unless you played wrong!]
yarn install v1.22.10
[1/5] Validating package.json...
warning casper@4.0.5: The engine "ghost" appears to be invalid.
warning casper@4.0.5: The engine "ghost-api" appears to be invalid.
[2/5] Resolving packages...
[3/5] Fetching packages...
info fsevents@1.2.13: The platform "win32" is incompatible with this module.
info "fsevents@1.2.13" is an optional dependency and failed compatibility check. Excluding it from installation.
[4/5] Linking dependencies...
[5/5] Building fresh packages...
Done in 204.81s.
  • To start the development server, run yarn dev on another terminal.
  • Now you can edit the code of your theme and see the changes by refreshing the local server.

That's it.

We've installed Ghost on your local machine and set up the development server. You can now customize the theme locally and once satisfied, you can upload it to the production server.

Stay tuned or subscribe to my weekly newsletter to see the next article on customizing the Ghost's default theme - Casper.