J. R. Swab

4 Reasons Why You Need Grav

Categories: [Technology]
Tags: [blogging], [CMS]

I started this blog with a content management system (CMS) called Publii. Publii is a very well made application, and I highly recommend it for anyone starting their first blog. It's easy to use, navigate, and update your site. All you need to get started is a host and a domain name. From there you punch in your FTP information, and that's it! You can push updates to your new blog.

For me, I wanted to have the ability to update my site on the go, sync with Git, and have more control over the back-end of the site.

Cause I'm a nerd that loves to hack things together.

Because I know (enough) about web hosting and Linux servers, I needed more control over the CMS then I could get out of Publii. If you are not a nerd that loves to spend time in the Linux command line Publii is your new best friend.

Grav CMS

Grav is a web-based CMS in much the same way that WordPress is web-based. You set up an account on your server and then log in to create posts, pages, upload media, or add plugins. But, it's much more tailored to the kind of person I am than WordPress.

For many years and on many blogs I was all in on WordPress (the .org version not the .com version). It did everything I needed, had tons of plugins, and everyone used it which it makes easy to find answers to problems.

But I did not want a database running my website. I wanted a flat, static site that with minimal JavaScript. Its all about the load times, the faster the page loads, the better. Not that WordPress is slow but why make unnecessary database queries all the time?

Some Cool Grav Features

Backup Is Simple

Since Grav is a flat file CMS, we are able to easily backup our data into small zip file every day. All it will take to restore your site is to copy those exact files back into the [grav directory]/user directory.

(The user directory holds the files that affect your website. All data outside of that directory should be left alone unless you know what you are doing.)

With that kind of ease, it also makes syncing with Git much more pleasant. There is even a plugin for Grav that will automatically sync your user files with the Git repository of your choice.

CLI or Web GUI

The base of Grav is command line driven, and all updates are editable with your favorite text editor. A great way to tinker with your files if you can only SSH into your web server or prefer to limit your GUI usage.

The CLI/text editing approach does mean that the author and developer of the site must know YAML and Twig. YAML is very simple, I was able to learn the syntax in about ten minutes thanks to a video online. Twig is also quite simple but will take a bit more learning.

For anyone not creating their own theme or that would like to access their data over a web browser there is the "Admin" plugin. This plugin may be added to the CLI for web GUI access or downloaded with Grav from the start.

The Admin plugin gives you a beautiful user interface, and if you have ever used WordPress, it will feel similar. There are differences, but you'll figure all that out as you mess around with the options.


I love to write in Markdown. If I ever write a book, I better be able to do so in Markdown.

Customize Anything and Everything!

Need a super custom theme? You can take an existing one that is close to what you need and modify the contents to fit your exact need. As mentioned above, all the files to edit are found in [grav directory]/user, and this includes any themes you choose to download or create from scratch.

Move to Grav

If you have any skill in development, programming, or web design than Grav is for you. Due to the flexibility, customization, and easy to learn syntax there is so much we can do. I am in the process of building out my own theme to fit my unique style (this is a personal blog after all). But even sticking to one of the pre-made themes still gives the site a professional feel.

I highly recommend you download "Grav + Admin" and give start playing around. You may find you like it more than WordPress and Joomla.