How to Migrate From Craft CMS to a Self-Hosted CMS
Drop per-project licensing, keep your PHP ops
Craft CMS is a well-regarded PHP CMS with a clean control panel and flexible content modeling — a favorite of agencies who want more structure than WordPress. But Craft is commercial, with per-project license fees plus paid Craft Cloud or self-hosting, and Craft Pro adds ongoing costs. Teams migrate off Craft when the licensing adds up across many client sites, when they want a one-time cost, or when they want a headless-first API without Craft's pricing. This guide walks the move to a self-hosted CMS with SEO intact.
TL;DR: Export Craft content via its element API or GraphQL, map sections and entries to posts and pages, import into a self-hosted CMS like UnfoldCMS, preserve slugs, set up 301 redirects for changed URLs, and repoint your front end. Both are PHP, so hosting and ops carry over cleanly.
Why migrate off Craft?
Clarify your reason — it shapes the work:
- Licensing cost. Craft Pro plus per-project fees add up, especially for agencies running many sites. See self-hosted vs SaaS five-year TCO.
- One-time cost preference. You'd rather pay once than carry recurring license and cloud fees.
- Headless without the premium. Craft's headless (GraphQL) is a Pro feature; you may want an API-first CMS without that tier.
- Simplification. For straightforward content sites, Craft's flexibility can be more than you need.
If Craft's content modeling and control panel are worth the fee, staying is fine. If cost across sites drives you, read on.
What you're moving to
This guide targets UnfoldCMS, a self-hosted CMS on Laravel with a REST API at /api/v1/*, content in your own SQLite or MySQL database, and a one-time cost. A nice bonus: both Craft and UnfoldCMS are PHP, so your hosting, deploy tooling, and ops knowledge carry over — no new runtime to learn.
Step 1 — Export your Craft content
Two clean export paths:
Via GraphQL (if you have Craft Pro):
query {
entries(section: "blog", limit: null) {
title
slug
... on blog_blog_Entry {
body
postDate
}
}
}
Via the database or a plugin: Craft stores content in a known MySQL schema; you can query entries directly, or use an export plugin. Either way you get structured records. Export your assets too — Craft stores them in configured volumes you can rehost.
Step 2 — Map sections to posts and pages
Craft organizes content into sections (channels, structures, singles) with custom field layouts. Map them:
| Craft | UnfoldCMS |
|---|---|
| Channel section (blog) | Post |
| Single / structure (pages) | Page (content_type=page) |
| Rich-text / Redactor field | Post body (HTML) |
| Asset field | Media library (featured-image) |
| Category relation | Post categories |
postDate |
posted_at |
slug |
Slug (preserve for SEO) |
Craft's content is structured (not a nested block tree), so this mapping is usually clean.
Step 3 — Handle body format
Craft rich-text fields (Redactor/CKEditor) output HTML, which drops straight into UnfoldCMS (it stores body as HTML). If you used Matrix or Neo blocks for complex layouts, you'll flatten those blocks into HTML with a small transform — render each block type to markup. Verify a few entries before bulk-importing.
Step 4 — Import into the CMS
Write a migration script that reads your Craft export and creates a post or page per entry. Preserve slugs for SEO, set posted_at from postDate to keep chronology, and attach assets to the media library. Since both sides are PHP with database storage, you can script the whole read-transform-write loop.
Step 5 — Preserve SEO with redirects
If URLs change, set up 301 redirects from old to new paths — the key to holding rankings. UnfoldCMS ships a redirects system. Preserve slugs to keep most URLs identical and redirects minimal. Note: if you used Craft's SEOmatic plugin, export those meta titles/descriptions and map them to UnfoldCMS's SEO fields so on-page SEO carries over. See migrate a blog without losing SEO.
Step 6 — Repoint your front end
If your site was headless (Craft GraphQL front end), repoint it to UnfoldCMS's REST API and rewrite GraphQL queries as REST calls — UnfoldCMS is REST-only. If your site used Craft's Twig templates, you'll rebuild the front end using UnfoldCMS's themes or a headless setup. Plan the front-end work based on which architecture you had.
Step 7 — Rebuild-on-publish
If you triggered rebuilds from Craft, replicate with UnfoldCMS's outgoing HMAC-signed webhooks pointed at your deploy hook. Publishing fires the rebuild.
Migration checklist
- [ ] Export entries via GraphQL, DB, or export plugin
- [ ] Export assets from Craft volumes
- [ ] Map sections and fields to posts and pages
- [ ] Flatten Matrix/Neo blocks to HTML if used
- [ ] Export SEOmatic meta and map to SEO fields
- [ ] Import content, preserving slugs and dates
- [ ] Attach assets to the media library
- [ ] Set up 301 redirects for any changed URLs
- [ ] Repoint front end (REST; rewrite any GraphQL)
- [ ] Replicate rebuild webhooks
- [ ] Verify sample pages before go-live
FAQ
Can I export my content from Craft CMS? Yes. Use Craft's GraphQL API (Pro), query the MySQL database directly, or use an export plugin. Assets are in configured volumes you can rehost.
Will I lose SEO migrating off Craft? Not if you preserve slugs, set up 301 redirects for changed URLs, and carry over meta titles/descriptions (from SEOmatic if you used it) to the new CMS's SEO fields.
Is the migration easier because both are PHP? Yes — hosting, deploy tooling, and ops carry over since Craft and UnfoldCMS are both PHP. The content mapping is the main work.
Does UnfoldCMS support GraphQL like Craft Pro? No — UnfoldCMS is REST-only. If your front end used Craft's GraphQL, you'll rewrite those queries as REST calls.
Bottom line
Migrating off Craft is a clean PHP-to-PHP move: export via GraphQL, DB, or a plugin, map sections to posts and pages, flatten any block fields to HTML, and import into a self-hosted CMS. Carry over slugs and meta for SEO, and rewrite any GraphQL to REST. You trade Craft's per-project licensing for a one-time cost while keeping your PHP hosting and ops. For an agency running many sites, the TCO math often favors the switch.
See UnfoldCMS in the demo or read Craft CMS alternatives.
Related: Craft CMS alternatives · How to migrate a blog without losing SEO · Self-hosted vs SaaS five-year TCO
Free & Open Source
Own your CMS. No subscriptions.
Unfold CMS is free to download and self-host. Built on Laravel + React, full source code included.
Share this post: