Goodbye WordPress, hello Grav: moving to a lighter blog

WordPress is powerful. Maybe too powerful.

For my little blog with a few articles, tutorials and pictures, it eventually felt like an enormous amount of software for a pretty simple job.

I wanted to write. Not maintain plugins, massage databases or click through backend menus that look as though they've only had a new coat of paint since 2012.

So I went looking for something lighter.

Why leave WordPress?

WordPress can do almost anything. That's also its problem.

For a straightforward personal blog, I don't need:

  • A database to administer
  • Dozens of plugins
  • A complicated block editor
  • A theme-building framework
  • A large comment system
  • Old WooCommerce leftovers
  • Security and caching plugins
  • One update triggering three more updates

What I actually need is:

  • Write articles
  • Insert images
  • Publish tutorials
  • Keep a simple structure
  • Host it myself
  • Carry as little baggage as possible

In short: WordPress had become overkill for me.

Why Grav?

Grav is a flat-file CMS. There's no traditional content database. The pages live as files on the server.

An article is basically a Markdown file with a small metadata section at the beginning.

Here's an example:

---
title: "Mein Artikel"
date: "2026-06-05"
taxonomy:
  category:
    - Selfhosting
visible: true
---

The article text goes underneath.

The big advantage is that I can back up, move and edit almost the entire blog as ordinary files. No MySQL export needed for the content, less database complexity, and a smaller software stack.

That doesn't mean security stops mattering — Grav, themes and plugins still need updates — but it's a simpler starting point.

Installation

I installed Grav alongside the existing WordPress site on my Hetzner hosting space.

That was important because the old blog needed to keep running until I knew the new one was ready.

The rough process:

  1. Create a subdomain.
  2. Check the supported PHP version.
  3. Download Grav with the Admin plugin.
  4. Upload it using SFTP.
  5. Create an administrator account.
  6. Clear the cache.
  7. Test everything.

I kept Grav in a separate directory rather than dropping it into the existing WordPress files. Mixing both applications would have been asking for trouble.

Test first, switch later.

The first misunderstanding: Grav isn't WordPress

After the import, the content was there, but the blog didn't immediately work the way I expected.

What was missing was a clean blog structure.

In Grav, a typical blog looks roughly like this:

user/pages/
  02.blog/
    blog.md

    erster-artikel/
      item.md

    zweite-anleitung/
      item.md

The blog.md file defines the overview page. Each article has its own directory and uses the item.md template in this setup.

If the importer leaves articles as default.md, index.md or random Markdown files, Grav doesn't automatically treat them as the same type of blog item.

The blog overview

My overview page looked something like this:

---
title: Blog
content:
  items: '@self.children'
  order:
    by: date
    dir: desc
  limit: 10
  pagination: true
---

Hier findest du die neuesten Artikel.

The idea is simple: load the child pages of the current blog page, sort them by date and show ten per page.

Straightforward — as long as the theme actually renders the collection.

The theme problem

Declaring a collection in frontmatter doesn't guarantee that the theme displays a useful blog list.

It needs appropriate templates, for example:

blog.html.twig
item.html.twig

Without them, the blog overview might be rendered as an ordinary page. No excerpts, no listing, no pagination.

This was one of the first lessons: Grav is lighter than WordPress, but it doesn't magically assemble a complete blog regardless of theme.

Migrating from WordPress

I didn't have a suitable one-click WordPress importer in my Grav installation, so I exported the content.

In WordPress, the route was:

Tools → Export → All content → Download XML.

I converted that export into Markdown afterwards.

The result was usable, but messy. A migration isn't magic. WordPress leaves traces.

Common problems included:

  • Broken image paths
  • Old WordPress shortcodes
  • Duplicate frontmatter
  • Incorrect filenames
  • Categories in the wrong format
  • Unix timestamps instead of readable dates
  • Pages not recognised as Grav blog items

The date problem

One imported article contained:

date: 1773360000

It looks odd, but it's just a Unix timestamp.

For that example, the intended date was:

13.03.2026

Grav may be able to interpret a timestamp, but I wanted readable dates in my files:

date: "2026-03-13"

Broken frontmatter

Some imported files had malformed or duplicated metadata.

This is the kind of thing I found:

---
title: "OpenClaw im Homelab"
date: 2026-03-13
categories:
  - "allgemeines"---
title: "OpenClaw im Homelab"
date: 2026-03-13
categories:
  - "allgemeines"

Not good.

What I wanted instead was a single clean frontmatter block:

---
title: "OpenClaw im Homelab: Ein (teures) Experiment mit autonomen AI-Agents"
date: "2026-03-13"
taxonomy:
  category:
    - allgemeines
visible: true
---

Grav's taxonomy structure is different from a simple WordPress-style categories field.

Repairing the files with a script

Correcting everything by hand in the Admin interface would have taken forever.

I downloaded the blog directory to my Mac, backed it up locally and ran a Python cleanup script over the Markdown files.

The steps were:

  1. Download the blog directory via SFTP.
  2. Back up the original files.
  3. Process the Markdown files locally.
  4. Repair frontmatter.
  5. Standardise dates.
  6. Convert categories into taxonomy.category.
  7. Remove duplicated blocks.
  8. Inspect the results.
  9. Upload the corrected files.
  10. Clear the Grav cache.

I didn't delete the old server-side directory first. I renamed it so I could roll back if something went wrong.

Backups aren't optional during a migration.

Useful search commands

After the cleanup I searched for leftovers:

grep -R --line-number -- "---title:" 02.blog
grep -R --line-number "^title:" 02.blog
grep -R --line-number "^categories:" 02.blog
grep -R --line-number "wp-content" 02.blog
grep -R --line-number "\[gallery" 02.blog

Hits are candidates for manual review. Not every occurrence is necessarily a bug.

Fixing filenames

In my blog theme, individual articles were meant to use item.md.

If the import produced index.md:

find 02.blog -name "index.md" -exec sh -c 'mv "$1" "$(dirname "$1")/item.md"' sh {} \;

If it produced default.md:

find 02.blog -mindepth 2 -name "default.md" -exec sh -c 'mv "$1" "$(dirname "$1")/item.md"' sh {} \;

Important: These are bulk rename examples from my migration, not commands I'd run blindly on somebody else's Grav installation.

First check every matching path and whether the destination item.md already exists. Renaming can overwrite or misclassify pages if the source layout is different. And of course the overview's blog.md must remain untouched.

What I learnt

The most important thing: don't try to recreate WordPress exactly.

That would defeat the whole point.

If I'm leaving WordPress to reduce maintenance, I shouldn't immediately rebuild the same complexity with:

  • Too many plugins
  • Endless theme customisation
  • Features I don't actually need
  • Obsessive preservation of ancient clutter
  • Endless polishing of old posts nobody reads

My preferred approach:

  1. Import everything.
  2. Get the site technically working.
  3. Clean up the important posts properly.
  4. Leave unimportant historical material as an archive.
  5. Don't spend weeks polishing every ancient page.

An interim conclusion

For me, Grav looked like the right compromise.

Hugo would have been even lighter, but I wanted a graphical editor. WordPress was too heavyweight. Grav sat somewhere in between: relatively simple, but with an Admin interface.

The migration wasn't effortless, but it was manageable.

A lot of the work wasn't Grav's fault. It was caused by years of accumulated WordPress content and the hidden assumptions that came with it.

Status when I wrote this

At the time, Grav was running in parallel on my Hetzner hosting. I had the WordPress export and was cleaning up the imported Markdown, blog structure and frontmatter.

The next items on my checklist were:

  • Check the blog overview
  • Enable pagination
  • Verify theme templates
  • Fix image paths
  • Manually tidy the most important articles

Only then could WordPress retire.

And honestly? It was about time.

This is a historical account of my migration work in June 2026; the site setup has developed further since then.