Ghost is a fully open source, hackable platform for building and running a modern online publication. It is a very good alternative to WordPress and blogger and Heroku is a platform as a service (PaaS) that enables developers to build, run, and operate applications entirely in the cloud. Heroku offers a free plan for experiencing the cloud. You can install Ghost on Heroku for free. Following is the step by step guide for installing Ghost Blog on Heroku.
- Download Ghost blog from here: https://ghost.org/developers/
- Unzip it into required folder.
Unzipped folder name is “ghost-0.11.3”. You can keep the name same or change it to any other name. I have renamed folder to “mytravels” as this is my blog name.
- Initial NPM and Install required NPM modules
Please follow the instructions as it appears on the screen.
This will take some time as it will install all dependencies.
4 . Initiate git repository
Initialized empty Git repository in F:/mytravels/.git/
- Login to Heroku by entering your Heroku credentials
Password (typing will be hidden):Logged in as email@example.com
- Create Heroku application
Creating app... done, desolate-journey-89792 https://desolate-journey-89792.herokuapp.com/ | https://git.heroku.com/desolate-journey-89792.git
cross check git configuration using following comments
F:mytravels>git remote -v
heroku https://git.heroku.com/desolate-journey-89792.git (fetch)
heroku https://git.heroku.com/desolate-journey-89792.git (push)
- Add PostgreSQL database
F:mytravels>heroku addons:add heroku-postgresql:hobby-dev
Creating heroku-postgresql:hobby-dev on desolate-journey-89792... free
Database has been created and is available
! This database is empty. If upgrading, you can transfer
! data from another database with pg:copy
Created postgresql-slippery-42334 as DATABASE_URL
Use heroku addons:docs heroku-postgresql to view documentation
- Get database configuration as below:
=== desolate-journey-89792 Config Vars
These details appear in following order:
- Rename config.example.js to config.js and add following code
- Add your domain name using following command
- Deploy these local changes to Heroku.
git add .
git commit -am "first commit"
git push heroku master