How to Migrate From Agility CMS to a Self-Hosted CMS
Own your content and drop the SaaS bill
Agility CMS is a hosted headless CMS with page management and a content API, popular with .NET and JavaScript teams that want structured content plus page-building. Like any SaaS CMS, the reasons to leave are cost as you scale, content living on Agility's platform, and no self-hosting. Migrating off Agility CMS to a self-hosted CMS is very doable — its Fetch/Content API returns clean JSON. This guide walks the move with SEO intact.
TL;DR: Export Agility content via its Content/Fetch API, map content models and page modules 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. Plan for flattening page modules into HTML.
Why migrate off Agility CMS?
Clarify your reason:
- Subscription cost. Agility pricing scales with usage and features as you grow.
- Hosted-only. It's SaaS. If self-hosting is a requirement, you must move.
- Data ownership. Content lives on Agility's platform. A self-hosted CMS puts it in your own database. See data ownership and your CMS.
- Vendor dependency. Pricing and plan changes are outside your control.
If Agility's page management and hosted convenience are worth the fee, staying is fine. If ownership or cost 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.
Set expectations: Agility separates content items from page structure (modules placed on pages). Flattening a page's modules into a single body — or mapping them to fields — is the main transform. Its content items themselves export cleanly.
Step 1 — Export via the Content API
Agility exposes content through its Fetch/Content API. Pull content list items and pages:
curl "https://api.aglty.io/YOUR_GUID/fetch/en-us/list/blogposts?take=100" \
-H "APIKey: YOUR_FETCH_KEY"
Page through with skip/take until you have every item. Also pull your sitemap/pages endpoint to capture page structure and the modules placed on each page. Save the full export and download assets from Agility's CDN.
Step 2 — Map content and pages
Agility's model has content items (structured records) and pages (built from modules). Map them:
| Agility | UnfoldCMS |
|---|---|
| Content list item (blog) | Post |
| Page (with modules) | Page (content_type=page) |
| Rich-text field | Post body (HTML) |
| Page modules | Flattened into body HTML |
| Image / attachment field | Media library (featured-image) |
| Category / linked content | Post categories |
| Publish date | posted_at |
| URL / slug | Slug (preserve for SEO) |
Content list items map cleanly. Pages built from modules need a transform to render each module to HTML and combine into a body.
Step 3 — Handle body and modules
Agility rich-text fields output HTML, which drops into UnfoldCMS directly (it stores body as HTML). For pages assembled from modules (hero, text block, gallery, etc.), write a small transform that renders each module type to HTML and concatenates them into the page body. Verify a few pages before bulk-importing.
Step 4 — Import into the CMS
Write a migration script that reads your Agility export and creates a post or page per item. Preserve slugs for SEO, set posted_at from the publish date, map categories, and attach images to the media library. The read-transform-write loop scripts cleanly since the Content API returns structured JSON.
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 minimize changes; audit every path. Carry over any SEO fields you modeled in Agility to UnfoldCMS's SEO fields. See migrate a blog without losing SEO.
Step 6 — Repoint your front end
Your front end calls Agility's Fetch API (or SDK). Repoint it to UnfoldCMS's REST API and rewrite those calls as plain fetch, reading data.data from the { success, message, data } envelope. If you used Agility's page-module rendering on the front end, you'll render the migrated page bodies instead. Plan the front-end work around your current architecture.
Step 7 — Rebuild-on-publish
If you triggered rebuilds from Agility webhooks, replicate with UnfoldCMS's outgoing HMAC-signed webhooks pointed at your deploy hook. Publishing fires the rebuild.
Migration checklist
- [ ] Export content list items and pages via the Content API
- [ ] Capture page structure and modules
- [ ] Download all assets
- [ ] Map content items and pages to posts and pages
- [ ] Flatten page modules into HTML
- [ ] Import content, preserving slugs and dates
- [ ] Carry over SEO fields, map categories
- [ ] Attach images to the media library
- [ ] Set up 301 redirects for any changed URLs
- [ ] Repoint front-end calls to REST
- [ ] Replicate rebuild webhooks
- [ ] Verify sample pages before go-live
FAQ
Can I export my content from Agility CMS? Yes. The Content/Fetch API returns every content list item and page as JSON, and assets are downloadable from the CDN. You get a full, exportable copy.
Will I lose SEO migrating off Agility? Not if you preserve slugs, set up 301 redirects for changed URLs, and carry over any SEO fields you modeled to the new CMS's SEO fields.
What's the hardest part? Flattening pages built from Agility's modules into a single HTML body (or mapped fields). Content list items export cleanly; module-based pages need a transform.
Do I have to rewrite my front end? You repoint API calls from Agility's Fetch API to UnfoldCMS's REST API. If you rendered page modules on the front end, you'll instead render the migrated page bodies. The amount of work depends on your current setup.
Bottom line
Migrating off Agility CMS means exporting via the Content API, flattening module-based pages into HTML, mapping content to posts and pages, and importing into a self-hosted CMS. Protect SEO with redirects and carry over metadata, then repoint your front end to REST. You gain data ownership and drop the subscription. The main effort is the page-module transform — content items themselves move easily.
See UnfoldCMS in the demo or read the blog migration SEO guide.
Related: Migrate from Contentful · How to migrate a blog without losing SEO · Self-hosted vs SaaS CMS
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: