How to install Ghost CMS locally

How to install Ghost CMS locally

Ghost CMS is a powerful, open-source platform designed for modern publishing. Whether you’re a developer looking to do some local development or just want to get a feel for the software, installing Ghost CMS locally on your machine is a great place to start. This guide will walk you through the process step by step.

Prerequisites

Before you begin, make sure you have the following:

  • A computer running MacOS, Windows, or Linux
  • A supported version of Node.js
  • Either yarn or npm to manage packages
  • A clean, empty directory on your machine

Step 1: Install Ghost-CLI

Ghost-CLI is a command-line tool that helps you get Ghost installed and configured for use quickly and easily. The npm module can be installed with npm or yarn on your local machine, depending on your preference. To install Ghost-CLI, open your terminal and run the following command:

npm install ghost-cli@latest -g

Step 2: Install Ghost

In your terminal, navigate into the empty directory you created and run the install command:

ghost install local

This command will install a local version of Ghost in development mode using SQLite3. This local install is not suitable for production use.

Step 3: Access Your New Site

Once the installation is finished, you’ll be able to access your new site on http://localhost:2368 and http://localhost:2368/ghost to access Ghost Admin.

Step 4: Starting and Stopping Ghost

Ghost runs in a separate background process and remains running until you stop it or restart your computer. Here are some commands you might find useful:

  • ghost stop to stop Ghost
  • ghost start to start Ghost
  • ghost log to view logs
  • ghost ls to list all running Ghost blogs

You can always run ghost help to see a list of available commands.

Conclusion

Congratulations! You’ve completed a local Ghost install. Now you’re ready to start exploring Ghost CMS and all the powerful features it has to offer.