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
Install Node latest version from https://nodejs.org/en/.
Verify the Node and NPM package version by running the
node -vcode on your terminal.
C:\Users\user>node -v v14.17.0
Then run the code for NPM -
You sould see the following response.
C:\Users\user>npm -v 7.16.0
- Now, install Ghost CLI by entering the following code in to terminal.
C:\Users\user>npm install -g ghost-cli@latest
- Now verify the successful installation of your Ghost CLI in your local machine and its version using
C:\Users\user>ghost -v Ghost-CLI version: 1.17.3
- 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 Desktopon your terminal.
- Create a folder named Ghost on your desktop by entering
- Now you'll be in the 'Ghost' folder
Finally, install Ghost on to the folder by using the command
ghost install local.
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/
Copy and paste the URL [http://localhost:2352/ghost/] into your browser.
You will be displayed with the Ghost admin screen.
Create an account in Ghost.
- After creating your account, you'll be directed to the admin dashboard of your Ghost website.
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.
- In this folder, enter the code
- You'll get something like this. [Unless you played wrong!]
yarn install v1.22.10 [1/5] Validating package.json... warning email@example.com: The engine "ghost" appears to be invalid. warning firstname.lastname@example.org: The engine "ghost-api" appears to be invalid. [2/5] Resolving packages... [3/5] Fetching packages... info email@example.com: The platform "win32" is incompatible with this module. info "firstname.lastname@example.org" 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 devon another terminal.
- Now you can edit the code of your theme and see the changes by refreshing the local server.
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.