How to Migrate From Directus to a Content-First CMS
The cleanest migration — database to database, SEO intact
Directus is a flexible data platform — a REST/GraphQL API and admin over any SQL database. That flexibility is its strength and, for content teams, sometimes its weakness. If you adopted Directus for a blog or marketing site, you may have found it's more of a data-modeling tool than a content-first CMS: no built-in blog conventions, SEO fields, or publishing workflow out of the box. Or you're on Directus Cloud and want to self-host something purpose-built for content. Either way, migrating to a content-first CMS is straightforward because your data is already in a clean SQL database. Here's how.
TL;DR: Directus content already lives in your own SQL tables, so export is easy. Map your collections to posts and pages, import into a content-first CMS like UnfoldCMS, preserve slugs, set up 301 redirects for any changed URLs, and repoint your front end's API calls. The database-to-database move is the cleanest kind of migration.
Why migrate off Directus?
Directus is good software; the mismatch is usually about fit:
- Data platform, not content CMS. Directus gives you tables and an API. Blog features — SEO metadata, categories, scheduled publishing, a media library with variants — you build yourself. A content-first CMS ships them.
- Content-team experience. The Directus admin is built around data. Writers often want a content-shaped editor, not a database table view.
- Cloud costs. If you're on Directus Cloud, self-hosting a purpose-built CMS may cut cost and give a better content workflow.
- Overhead for simple sites. For a straightforward blog or marketing site, Directus can be more machinery than you need.
If you're using Directus for genuinely relational, data-heavy applications, it's the right tool — stay. If you adopted it for content and it's fighting you, read on.
What you're moving to
This guide targets UnfoldCMS, a self-hosted CMS on Laravel purpose-built for content: posts, pages, categories, SEO fields, scheduled publishing, and a media library, with a REST API at /api/v1/*. It replaces Directus's build-it-yourself content layer with conventions that exist out of the box. Your data stays self-hosted, just in a content-shaped CMS.
Step 1 — Export from Directus
Your content is in your own SQL database, which makes this the easiest export of any migration. Two options:
Via the API:
curl "https://your-directus.com/items/articles?limit=-1" \
-H "Authorization: Bearer YOUR_TOKEN"
Or straight from SQL — since you own the database, you can query the collection tables directly:
SELECT id, title, slug, body, status, date_created FROM articles;
Either way you get clean, structured records. Export your file/asset records too — Directus stores files with a known path structure you can rehost.
Step 2 — Map collections to posts and pages
Directus collections are arbitrary — you named and shaped them. Map them to the target CMS's content model:
| Directus | UnfoldCMS |
|---|---|
articles collection |
Post |
pages collection |
Page (content_type=page) |
| Body field (HTML or markdown) | Post body (HTML) |
status (published/draft) |
is_published |
| Relation to categories | Post categories |
| File field | Media library (featured-image) |
slug |
Slug (preserve for SEO) |
Because Directus content is already structured (not a nested block tree like some SaaS CMSes), this mapping is usually clean and mechanical.
Step 3 — Handle body format
Check how your body content is stored in Directus. If it's already HTML, it drops straight into UnfoldCMS (which stores body as HTML). If it's markdown, convert it to HTML on import. If you used a Directus rich-text/WYSIWYG interface, it's likely HTML already — verify a few records before bulk-importing.
Step 4 — Import into the CMS
Write a migration script that reads your Directus export and creates a post or page per record. Preserve the original slug for SEO, set posted_at to the original creation/publish date to keep your archive's chronology, and map the status field to is_published. Attach files to the media library.
Since both sides are databases, you can script this end-to-end — read from Directus's DB or API, transform, write to the CMS via its API or directly. No manual copy-paste.
Step 5 — Preserve SEO with redirects
If your URL structure changes, set up 301 redirects from old paths to new ones. UnfoldCMS has a built-in redirects system. Preserve slugs where you can so most URLs stay identical and redirects are minimal. This step protects your rankings — don't skip it. See migrate a blog without losing SEO.
Step 6 — Repoint your front end
Your front end calls Directus's REST or GraphQL API. Update it to call the new CMS's REST API and adjust the response mapping. Note: if you relied on Directus's GraphQL, UnfoldCMS is REST-only — you'll rewrite those queries as REST calls. Budget for that if GraphQL was central to your fetch layer.
Step 7 — Rebuild-on-publish
If you triggered rebuilds from Directus events (flows/webhooks), replicate that with UnfoldCMS's outgoing HMAC-signed webhooks pointed at your host's deploy hook. Publishing fires the rebuild — same automation, content-first CMS.
Migration checklist
- [ ] Export collections via API or direct SQL
- [ ] Export file/asset records
- [ ] Map collections to posts and pages
- [ ] Confirm body format (HTML vs markdown) and convert if needed
- [ ] Import content, preserving slugs and dates
- [ ] Attach files to the media library
- [ ] Set up 301 redirects for any changed URLs
- [ ] Repoint front-end API calls (REST; rewrite any GraphQL)
- [ ] Replicate rebuild webhooks
- [ ] Verify sample pages before go-live
FAQ
Is it easy to migrate off Directus? Yes — easier than most. Your content already lives in a clean SQL database, so export is trivial via the API or direct queries. The main work is mapping your custom collections to the target CMS's content model.
Will I lose SEO? Not if you preserve slugs and set up 301 redirects for any URLs that change. Same-slug migrations need almost no redirects.
Does UnfoldCMS support GraphQL like Directus? No — UnfoldCMS is REST-only. If your front end depends on Directus's GraphQL, you'll rewrite those queries as REST calls. Plan for it.
Why move from Directus to a content CMS? Directus is a data platform; you build content features (SEO, categories, scheduling, media) yourself. A content-first CMS like UnfoldCMS ships those out of the box, giving writers a content-shaped editor instead of a database view.
Bottom line
Migrating off Directus is the cleanest kind of move because your content already sits in your own SQL database. Export it, map your collections to posts and pages, import into a content-first CMS, and protect SEO with redirects. You trade Directus's data-modeling flexibility (and its GraphQL) for built-in content conventions and a writer-friendly editor. If you adopted Directus for content and it's been fighting you, this is the upgrade.
See UnfoldCMS in the demo or read the blog migration SEO guide.
Related: Migrate from Strapi · How to migrate a blog without losing SEO · Self-hosted CMS complete guide
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: