Migrating from Perch Runway to Kirby
Posted in thoughts
I finally took the time to migrate my Perch Runway website to Kirby. You are reading these lines on a page served by the latest release of Kirby CMS.
I’d been wanting to make the switch ever since attending a workshop by Bastian Allgeier at New Adventures 2020.
Then I discovered Kirby
Kirby's philosophy immediately appealed to me. I’ve always preferred treating the file system as the foundation of a website rather than hiding everything away in a database (and depending on it). Long before discovering Kirby, several bespoke content management systems I’d designed for clients followed a similar principle. Kirby simply felt like the natural expression of that idea.
Only a year earlier, I had migrated this weblog from Movable Type to Perch Runway. At the time, Perch Runway was an excellent fit for the site. It was lightweight, flexible and let me build exactly what I wanted without getting in the way. I happily recommended it over WordPress whenever it made sense.
It quickly became my CMS of choice. I started recommending it to clients, migrated several existing websites and built new ones with it. My own website, however, proved to be a much bigger undertaking.
Over the years I had built a fairly sophisticated content model in Perch Runway, complete with custom collections, bespoke blocks and years of accumulated content. Migrating all of that wasn’t simply a matter of exporting a database and importing it somewhere else.
By 2022, I had a working Kirby version of the site running locally, with matching collections and blocks. The foundations were there, but client work kept taking priority and the project quietly sat on the shelf for four years. Don’t ask.
Switching for real
When I finally picked it up again, I wrote a collection of export scripts and helper functions to transform the existing content stored in Perch’s database into Kirby content files. Along the way I refreshed—or completely rewrote—many of the templates and snippets, which had become rather dated since my first experiments with Kirby. The framework itself had evolved considerably, and I wanted the codebase to evolve with it.
I also took the opportunity to simplify a number of existing components, rethink parts of the content model, improve responsive image handling and make it easier to integrate external sources such as Flickr or Raindrop.io. Some ideas I’d wanted to implement for years suddenly became much easier once the migration was underway. I learned a bunch about how Kirby works, and incidentally about the new features of the PHP language.
The migration itself was almost the easy part. The challenge was preserving more than twenty-five years of content (with its own legacy issues), keeping every URL intact, maintaining publication dates and metadata, and ensuring that the public-facing site changed as little as possible while the foundations underneath were completely rebuilt.
Outcome
Perhaps the biggest benefit wasn’t changing CMS at all. It was having an excuse to revisit code I’d written years ago, delete a surprising amount of it, and take advantage of everything Kirby has included since I first experimented with it in 2022.
If you’re facing a similar migration from Perch Runway, I’ve published the export scripts and helper functions on GitHub. They’re tailored to my own content model rather than being a generic migration tool, but they should provide a useful starting point—and perhaps save you a few hours of work.
