What Is Grav CMS? Flat-File CMS Without a Database

Grav takes a clearly different approach from WordPress or Joomla — it uses no database at all, storing content directly as Markdown files on the server. This guide explains how a "flat-file CMS" works, its strengths and limitations, and the kind of project it suits.

Grav and the Flat-File CMS Concept

Grav launched in 2014 from the RocketTheme team, built in PHP. What sets it apart is that it needs no MySQL or any database. Each page of content is stored as a Markdown file, configuration uses YAML files, and themes are built with Twig. The whole site is simply a "folder of text files" you can read and edit directly.

How a Website Without a Database Works

A typical CMS like WordPress must pull content from a MySQL database every time someone opens a page. Grav reads Markdown files straight from the filesystem and caches the result. This removes the database query step, so pages whose content doesn't change often respond quickly — and backups are easy: just copy the entire folder.

The Advantages of Not Relying on a Database

Grav vs. Other Popular CMS Options

Choosing the right CMS depends on the nature of your project and your team's skills. The table below summarises the key differences.

CMS Database Best For Plugin Ecosystem
Grav None required Portfolios, docs, landing pages Small but curated
WordPress MySQL required Blogs, stores, general sites Very large (60,000+ plugins)
Joomla MySQL required Corporate sites, mid-size portals Medium
Hugo / Jekyll None (static generator) Developer blogs, documentation Small; requires CLI knowledge

Limitations That Make Grav Unsuitable for Every Job

The flat-file approach has trade-offs. Grav's community is far smaller than WordPress, so fewer plugins and themes are available. Grav has no built-in shopping cart, so it doesn't suit online stores. And once content grows into the thousands or tens of thousands of pages, reading files from the filesystem becomes slower than an indexed database — Grav is therefore better suited to small-to-mid sites.

Installing Grav on Hosting in 3 Steps

Because Grav is a PHP application that needs no database, installing it on shared hosting is very easy. First, download the Grav package (the version that includes the Admin plugin is recommended). Second, upload and extract the ZIP via DirectAdmin's File Manager into the folder you want. Finally, open the site URL to create your admin account — and you can start writing content.

Compatibility: Grav only needs PHP 8.x with standard extensions. AsiaGB hosting supports PHP 8.2 / 8.3 on SSD, so it runs Grav immediately with no database configuration.

File Structure and Writing Content in Grav

In Grav every page is a folder containing a Markdown file. The folder hierarchy maps directly to the URL structure. For example, a folder at user/pages/01.home/ serves the homepage and user/pages/02.about/ serves /about.

The content file inside each folder is named default.md (or named after the template you want to use). It starts with a YAML frontmatter block for setting the title, description, and other page options, followed by the content written in standard Markdown. A basic example looks like this:

---
title: About Us
description: Learn about our company
---

## About Us

This page content is written in standard **Markdown**.

The major benefit of this approach is instant Git compatibility. Every change to every page can be tracked with git log and rolled back with git revert — tools developers already know. There is no need to export and import database dumps when migrating or collaborating.

Key Plugins and Themes in Grav

Although the Grav ecosystem is smaller than WordPress, the available plugins cover the core needs of most projects. All plugins are installed via the Grav Package Manager (GPM) from the command line or through the Admin Panel.

Maintaining and Updating Grav

Grav's update process is simpler than database-driven CMS platforms because there are no database migration scripts to worry about. Updates can be applied directly from the Admin Panel or via two GPM commands on the command line.

bin/gpm selfupgrade   # Update Grav core itself
bin/gpm update        # Update all plugins and themes

Because every file is plain text, backups are straightforward. Simply archive the user/ folder, which contains all content, themes, plugins, and configuration together. If you are already using Git, backups are automatic — every commit preserves the complete state of the site at that point in time, making recovery fast and reliable.

What Grav Does Best

Grav shines for portfolios, landing pages, documentation sites, and small company sites whose content doesn't change often — especially for teams comfortable with Markdown who want to manage the site through Git. Jobs needing memberships, a store, or a vast amount of content should choose a CMS designed specifically for that.

Frequently Asked Questions

Can Grav build an online store?

It isn't ideal — Grav has no built-in shopping cart. To sell products, use WooCommerce or OpenCart.

Is a site slow without a database?

For small-to-mid sites, Grav is usually faster because it skips the database query step. For sites with tens of thousands of pages, a database system has the advantage.

Does it need much technical knowledge?

Some comfort with Markdown and YAML helps, but the version with the Admin plugin provides a web-based management interface that makes it easier.

Start with Grav on PHP 8.x Hosting

Hosting from ฿500/year · PHP 8.2/8.3 · SSD · no database setup required

View Hosting Plans