Migrating this blog from WordPress to GravCMS v2
Migrating from WordPress to GravCMS v2 was fairly straightforward, with all recent content and theme included. Grav is a modern flat file CMS with optional admin panel. Version 2 released earlier this year and was a huge step forward from the v1.x system.
Why migrate?
WordPress is on a downward spiral in my opinion, as someone who's relied on WordPress for my own and client sites for 10+ years. Gutenberg and Full Site Editing are a nightmare (usability and code), and most of my job is turning off those and all the other crap Automattic keep adding to WordPress.
The theme & plugin ecosystem is absolute madness. Companies are gouging for basic functionality and abusing the notification system. Most themes don't really do anything aside from push complicated, paid page builders that break all the admin UI conventions and spit out bloated, even slower sites.
Many small businesses asked me for WordPress, then never actually updated their content. Easy updates are the reason to choose a content management system, like WordPress. Unless they constantly update the core app and plugins their site will definitely get hacked. AI is now carrying out incredible hacks within days of a release. I have ended up spending most of my time updating WordPress sites for clients, which is poor value for clients and absolutely not what I want for my career.
The legal bunfight between Automattic and WPEngine and then the Advanced Custom Fields ownership tussle really put me off, and hints at the corporate nonsense that surrounds the product. The recent stuffing of AI features into core while ignoring the colossal technical debt and horrific speed of WordPress was the final straw for me.
Setting up the Grav site locally
I downloaded the Grav & Admin zip and put it in a Dropbox folder. No PHP, NPM, Composer or database required. Done.
Exporting the WordPress site
I installed https://github.com/jgonyea/wp2grav_exporter and downloaded the zip file. It created folders for each page and post containing markdown file and images for that post.
Migration
To be honest I just got Cursor to migrate my theme and the exported pages all went into the user/pages folder.
Some trickery was needed to get the blog as the homepage. Various other tweaks and plugins were needed to map the WordPress theme and content into Grav.
- Installing the
Feedto add the RSS feed - Installing
SimpleSearchto manage the search box. The search runs on flat files but performance seems fine - WordPress creates various sizes of image when uploading, but Grav creates them only as needed. I added four sizes - mobile standard/retina and desktop standard/retina, so mobile users don't load the full size images.
One amazing Grav feature is the built in 301 redirects that redirect /2026/05/ prefixes from my old URLs to just the post slug, so visitors from search engines don't get a 404 error. Also an easy redirect of /category/business etc which saved me a huge amount of time!
Theme tweaks
I'd had the design on the WordPress version for a couple of years, so took the chance to add better dark mode and switch to the Nord palette. Lovely.
Deployment
Getting the local site onto the server was incredibly easy - just zip and upload the local Grav directory, unzip, delete the dev cache folder, edit the .env file and it was good to go. Adding the site URL in Grav admin tightened email security, and that was about it.
Grav has a lot of files in its install so I have found zipping, uploading and unzipping is way faster than FTPing the folder.
The theme is also in a Git repo so I can continue to work on it locally and then just deploy the theme files.
Summary
Migrating from WordPress to GravCMS v2 was straightforward and not a time consuming project. While Grav works in some fundamentally different ways to WordPress, I much prefer the speed and security it offers. I've migrated several clients over to Grav to reduce their maintenance burden, and my own site Intention is nearly migrated too. A big thumbs up to the Grav team!