Blog It Yourself - Ghost
This article is part of a series called "Blog It Yourself"
So here’s an experience report on the installation, configuration, and usage of Ghost, which presents itself as an alternative to WordPress, simpler, lighter, and more modern.
Let’s leave aside the paid version of Ghost that offers hosting by the company, and thus minimal configuration for the user. Let’s focus on the free and open-source version of the tool, to be self-hosted.
Because there’s never a bad occasion to learn something, we chose to host the blog on a free AWS instance to avoid any unnecessary cost while waiting to know the site’s traffic.
Indeed, AWS offers a free version for one year of one of the smallest machines on its EC2 service. The specifications of this machine generally meet the prerequisites recommended by Ghost in its documentation, so we didn’t go any further!
Again, the goal is to keep it simple and fast, thanks to the fairly comprehensive documentation provided by Ghost, describing the manual installation on different OSes and configurations. We followed the Ubuntu guide.
Note that Ghost provides a small utility to manage your site, from installation to updates: Ghost CLI.
With this tool installed (
npm i -g ghost-cli), all that’s left is to run the
ghost install command, answer a few questions (site name, URL, etc.), and you’re good to go:
$ ghost install
✔ Checking system Node.js version
✔ Checking logged in user
✔ Checking current folder permissions
✔ Checking memory availability
✔ Checking free space
✔ Checking for latest Ghost version
✔ Setting up install directory
✔ Downloading and installing Ghost v4.2.2
✔ Finishing install process
? Enter your blog URL: https://myblog.com
? Enter your MySQL hostname: localhost
? Enter your MySQL username: mycoolname
? Enter your MySQL password: [hidden]
? Enter your Ghost database name: ghost_prod
Once the site is launched (
ghost start), a quick navigation assures us that everything seems to be working as expected.
It is now possible to create an administrator account and one or more "writer" accounts from the site’s interface. Article writing can start smoothly!
Let’s be clear: it’s great! With minimal effort, we have an operational site, a comprehensive back office, and a friendly text editor.
I emphasize the text editor; it is on par with what you can find on Medium, and far superior to what WordPress offers. And you can even write your articles in Markdown!
I was just talking about Markdown in a series of articles about "Documentation as Code".
If the website obtained at the first launch is fully functional, it should be noted that many optimizations are almost mandatory to achieve a fast and well-referenced blog.
NGINX, Performance, and SEO
Having a blog is good, having a blog that is indexed by search engines is even better!
By following the installation process, Ghost uses Nginx as a reverse proxy. By modifying its default configuration, we can achieve higher performance than the already decent performance at the initial launch. These performance optimizations include image optimization and browser caching.
Rather than paraphrasing already comprehensive articles, I encourage you to take a look at [this](https://bironthemes.com/blog/configure-nginx-for-ghost/) and [that](https://web.archive.org/web/20230606152944/https://dzone.com/articles/optimize-ghost-blog-performance-including-rewritin) for more details.
Comments and Contact
Once the blog is online and the first articles are written, it is natural to have new needs.
For example, how to get a comments module under the articles to engage with the growing community? One solution that came to our mind quite easily is Disqus, although there are other tools available. The integration of this tool is almost native in Ghost’s [documentation](https://ghost.org/integrations/disqus/), so the setup is quick.
Another common feature is a contact page to allow visitors to contact the blog author in a more private way. Again, several third-party services can be used for this purpose. We chose Formspree, which allows managing different types of forms. Once again, the Ghost [documentation](https://ghost.org/integrations/formspree/) has a dedicated page for it.
It’s worth noting that Ghost’s [documentation](https://ghost.org/integrations/) covers numerous integrations, and most of the needs seem to be covered!
The Many Features
Ghost provides a list of features on a dedicated [page](https://ghost.org/feature-index/), and it’s safe to say that they are quite extensive.
At first, it’s very exciting: the blog I’m setting up will be able to do a lot of things on its own, which is great. But then, we can start to think that it’s not as lightweight and simple as initially promised…
Among the features that outshine WordPress, I would mention the management of a publication workflow, including the concept of reviews and multiple authors. This is very interesting, especially for a semi-professional blog where publications need to be well-polished from the moment they are published.
And among the features that might be considered excessive, there’s the management of free and paid members. This is only relevant for a fraction of online authors; not everyone needs a system worthy of a national newspaper.
Honestly, would you pay to read me?
(If the answer is "yes," send me a check, no problem!)
Well, maybe setting up a newsletter to be notified of new publications is a reasonable idea.
Ghost is a good solution to quickly set up a blog and focus on writing articles.
I was convinced because with a few clicks and command lines, I obtained a very comprehensive blog.
However, in its self-hosted version, Ghost is not without its challenges:
Ensuring the security of the AWS instance, Nginx, and Ghost itself
The default configuration is not sufficiently optimized
There are frequent updates (55 in 2021, including a major version, fortunately [well-documented](https://ghost.org/docs/changes/))
It is a bit heavy for the free AWS EC2 instance
Let’s also mention its (too) many features that go beyond its original slogan: "Just a blogging platform".
In the [next article](/blog/blog-it-yourself-hugo), I will tell you how I switched from Ghost to Hugo, with a radical change in philosophy.