Ghost is a new, free and open source blogging platform with a very simple and easy to use interface. Ghost focuses on one thing: Publishing. If you haven’t read Joe Hewitson’s recent article, you should.
PHP is the world’s most popular and widely supported programming language. Some of the most popular CMS like WordPress, Joomla, Drupal – and even Facebook – use PHP as their core language, but Ghost has been built with Node.Js, not with PHP.
Ghost claims to be a simple blogging platform, but unfortunately the first step to get started with Ghost is not simple. Installation process of Ghost is not simple and easy. It is complicated and might be confusing for some users. Installation on a live server and a local PC is not simple.
If you install Ghost on a local PC, you will have to install additional programs like Node.Js and fire up the command line. No doubt, using the command line can be confusing if you’re not used to it.
Currently available installers
There are a couple of installers available at the moment for local and live web server installation.
Installation on Live Servers
Here are some options to deploy to the cloud.
- Deploy to the cloud with Bitnami.
- Launch Ghost with Rackspace deployments.
- Get up and running with a DigitalOcean Droplet.
Local installation on Windows, Mac or Linux
Bitnami ghost installer is the easiest way to install Ghost on Windows, Mac or Linux. You can download it from http://bitnami.com/stack/ghost/installer.
If Bitnami Ghost installer does not work for you and you see any errors then you can install Ghost manually. In this tutorial I am going to share my experience of installing Ghost on a Windows PC.
I downloaded Bitnami Ghost installer for Windows, it worked fine on Windows 7 (the most widely used Operating System with 46.42% market share) but it gave me a PHP 5.5 error on Windows XP (the second most popular Operating System with 31.24% market share).
I decided to install Ghost manually on Windows XP. Here is a screenshot of the error message in Windows XP.
How to install Ghost manually?
For manual installation you need to install Node.Js and the Ghost source files.
Step 1 : Download and install Node.Js
Go to nodejs.org, download the Node installer and install it.
Step 2 : Download and Extract Ghost files
Visit Ghost.org, sign up for an account or log in if you already have an account and download the Ghost zipped archive. Next we need to extract the Ghost files. Go to the root of your C drive, create a new folder, name it ghost-#.#.# ( replace # with the version of ghost) and extract all the files from the zipped archive to this new folder.
Start Node.js Command Prompt
In your Start Menu go to All Programs, find ‘Node.js’ and then choose ‘Node.js Command Prompt’. Now we need to change the directory to
c:\ghost-0.3.3, where we extracted Ghost.
cd c:\ghost-#.#.#(replace # with Ghost version number) and press Enter
- Next type
npm install --productionand press the Enter key
Here is a screenshot of the Node command prompt.
Learn PHP for free!
Make the leap into server-side programming with a comprehensive cover of PHP & MySQL.
RRP $11.95 Yours absolutely free
Now you need to wait for a minute or two. When npm has finished installing, type
npm start to start Ghost.
Open your browser (Firefox, Chrome, Safari) and navigate to
127.0.0.1:2368 to see your newly setup Ghost blog home page.
Now just change the URL to
127.0.0.1:2368/ghost and create your admin user to log in to the Ghost admin. Enter your full name, email and password (must be 8 characters long) and click sign up, and you will be logged in to your Ghost Dashboard.
Step 3: Change Ghost URL in config.js file
When you visit
127.0.0.1:2368/ghost you will see two notifications. The first one is for mail and another one is about Ghost URL. You will have to change the URL in config.js file. You can find config.js in the root directory of Ghost. (C:\ghost-0.3.3)
Open config.js file in any text editor (SublimeText, Brackets etc) or you can use NotePad in Windows. Find
http://my-ghost-blog.com and replace it with
http://127.0.0.1:2368/ around line 11 and line 47.
Step 4: Restart Node.js Command Prompt
Now close Node.js Command Prompt and start it again, so changes can take effect. If you don’t restart Node.js Comamand Prompt, you will see following screen.
After restarting Node Command Prompt, change the directory to where you have extracted Ghost and type
npm start to start Ghost blog.
Congratulations! You have installed Ghost successfully.
Keep in mind if you close Node.js Command Propmt or restart your PC, your Ghost blog won’t work. You will have to restart it via Node.js Command Prompt.
Now you know how to install Ghost, give it a try and share your experience in the comments.
Jump Start Git, 2nd Edition
Visual Studio Code: End-to-End Editing and Debugging Tools for Web Developers