Your Craft Site Takes 3.2 Seconds to Paint. You're Losing Buyers at Second Two.
Why leave Craft CMS?
- Renders Twig server-side on every request, adding 300-800ms PHP execution time before the first byte ships
- Forces frontend developers to toggle between JavaScript build tools and PHP/Twig templating syntax daily
- Requires LAMP/LEMP stack hosting or managed Craft services, multiplying infrastructure costs and attack surface
- Plateaus mobile Lighthouse scores at 45-65 without aggressive Redis caching or the paid Blitz plugin
- Locks your engineering team into Yii2 framework expertise, shrinking your hiring pool and slowing custom module work
- Couples content rendering to database query performance, creating unpredictable TTFB spikes under traffic
What you gain
- Delivers pre-rendered static HTML with 95-100 mobile Lighthouse scores out of the box, no caching plugins required
- Deploys to Vercel or Cloudflare edge networks where TTFB drops from seconds to sub-100ms globally
- Ships island architecture so interactive components load React, Vue, or Svelte only where needed, not across every page
- Hands frontend developers file-based routing and TypeScript components they can onboard to in hours, not weeks
- Fetches all content at build time via GraphQL, eliminating runtime database queries and the latency they create
- Preserves your entire URL structure, redirects, and SEO metadata through automated route mapping and 301 chains
Why Craft CMS Teams Start Looking at Astro
Craft CMS earned its reputation. The control panel is genuinely pleasant to use. Matrix fields give content teams flexible layouts without plugins. The GraphQL API works. Twig templating is clean. For a PHP-based CMS built on Yii2, Craft does a lot right.
The frontend story has limits, though. Twig templates render server-side on every request, which means your Lighthouse scores depend on PHP execution time, server caching layers, and how hard you push on asset optimization. Most Craft sites we audit land between 45-65 on mobile Lighthouse. Not terrible -- just not competitive when static-first frameworks exist.
The real friction shows up at scale. Craft's PHP/Yii2 stack forces frontend developers to context-switch between modern JavaScript tooling and Twig. Your deployment pipeline runs through PHP. Hosting requires a LAMP/LEMP stack or a managed service like Servd. Every page load hits the database unless you're layering on Redis, Blitz, or static caching plugins.
Astro eliminates all of that on the frontend side. Zero JavaScript by default. Static HTML at the edge. And when you need interactivity, you bring exactly the framework you want -- React, Vue, Svelte -- with island architecture that hydrates only what matters.
Two Migration Paths: Pick What Fits
We offer two distinct approaches depending on how invested you are in Craft's content modeling and admin experience.
Option A: Craft Headless + Astro Frontend
If your content team loves Craft's control panel -- and many do -- keep it. Craft's GraphQL API exposes entries, assets, globals, and custom fields. We strip out the Twig frontend entirely and build your site in Astro, pulling content via GraphQL at build time.
This gives you:
- Static HTML output deployed to Vercel or Cloudflare Pages
- Craft's admin stays exactly as your editors know it
- Incremental builds triggered by Craft webhooks on content save
- Edge delivery with sub-100ms TTFB globally
The tradeoff: you still maintain a PHP server for the Craft backend. Hosting costs stay in the $30-80/month range for managed Craft hosting. But your frontend performance becomes world-class.
Option B: Full Migration to Payload CMS + Astro
If you want to leave PHP entirely, we migrate your content model to Payload CMS -- a TypeScript-native CMS that runs on Node.js with MongoDB or Postgres. Payload's admin UI is React-based, highly customizable, and supports the same kind of flexible content modeling that makes Craft special.
This gives you:
- One language across the entire stack -- TypeScript everywhere
- Self-hosted or cloud with dramatically lower infrastructure complexity
- Built-in access control that matches or exceeds Craft's user permissions
- REST and GraphQL APIs out of the box
- No PHP dependency in your deployment pipeline
We map your Craft sections to Payload collections, migrate Matrix blocks to Payload's block fields, and transfer all content programmatically. Your editors get a modern admin that feels familiar within a day.
Converting Twig Templates to Astro Components
Craft sites use Twig for templating. Astro uses .astro components with a frontmatter script section and an HTML template section. The mapping is surprisingly clean:
- Twig
{% include %}and{% embed %}become Astro component imports - Twig
{% for %}loops become JavaScript.map()in the template - Twig
{% if %}conditionals become ternary expressions or early returns - Craft's
entry.matrixField.all()queries become GraphQL fragments - Asset transforms map to Astro's
<Image />component with Sharp optimization
We don't just translate syntax. We restructure your templates into a proper component architecture -- shared layouts, reusable UI primitives, and content-specific page templates. The result is a codebase any modern frontend developer can maintain without dusting off their Twig knowledge.
Handling Matrix Blocks
Matrix fields are Craft's killer feature, and they need careful migration. Each block type becomes either an Astro component (Option A) or a Payload block type plus Astro component (Option B). We build a block renderer that dynamically maps content blocks to components, preserving the editorial flexibility your team relies on.
SEO Preservation Strategy
Craft CMS sites typically have clean URL structures -- no .php extensions, no query parameters. That's good news for migration. Our process:
- Full URL inventory -- We crawl your site and catalog every URL, redirect, canonical tag, and internal link
- 1:1 route mapping -- Astro's file-based routing mirrors your existing URL structure exactly
- 301 redirect map -- Any URLs that must change get permanent redirects configured at the edge
- Meta tag transfer -- SEO titles, descriptions, OG tags, and structured data move to Astro's
<head>management - XML sitemap generation -- Built automatically from your content at build time
- Search Console monitoring -- We track indexing status for 90 days post-launch
Craft's SEOmatic plugin data gets extracted and mapped to your new Astro templates. No rankings left behind.
Our Migration Process
Week 1-2: Audit and Architecture We document your Craft installation -- content types, sections, Matrix blocks, asset volumes, plugins, custom modules, and any Yii2 customizations. We recommend Option A or B based on your team's technical direction and content workflow requirements.
Week 3-5: Build Astro frontend development begins. We convert Twig templates to Astro components, integrate with either Craft's GraphQL API or a new Payload CMS instance, and implement your design system. For Option B, content migration runs in parallel.
Week 6-7: Content Migration and QA Full content transfer (Option B), visual regression testing against your current site, performance benchmarking, and editorial team training on any new workflows.
Week 8: Launch DNS cutover, redirect verification, Search Console submission, and performance monitoring.
Learn more about our Astro development capabilities.
Timeline and Pricing
A typical Craft CMS to Astro migration runs 6-8 weeks.
- Option A (Craft Headless + Astro): $15,000-30,000 depending on template complexity and number of Matrix block types
- Option B (Payload CMS + Astro): $25,000-50,000 including full content model migration and CMS setup
Smaller sites with fewer than 20 templates and straightforward content models land at the lower end. Sites with complex Matrix configurations, multi-site setups, or Commerce integration require custom scoping.
Why Social Animal for This Migration
We've migrated PHP-based CMS platforms to headless architectures across dozens of projects. We know Craft's content model deeply -- including the edge cases around eager loading, element queries, and Matrix field nesting. And we build Astro sites that score 95+ on Lighthouse without sacrificing editorial flexibility.
Your content team shouldn't have to compromise. Your frontend performance shouldn't either.
The migration process
Discovery & Audit
We map every page, post, media file, redirect, and plugin. Nothing gets missed.
Architecture Plan
New stack designed for your content structure, SEO requirements, and performance targets.
Staged Migration
Content migrated in batches. Each batch verified before the next begins.
SEO Preservation
301 redirects, canonical tags, sitemap, robots.txt — every ranking signal carried over.
Launch & Monitor
DNS cutover with zero downtime. 30-day monitoring period included.
Craft CMS vs Astro
| Metric | Craft CMS | Astro |
|---|---|---|
| Lighthouse Mobile | 45-65 | 95-100 |
| TTFB | 800ms-2.5s | <100ms |
| Build Time (100 pages) | N/A (server-rendered) | ~15s |
| Hosting Cost | $30-80/mo (managed) | $0-20/mo (edge CDN) |
| Developer Experience | PHP/Twig/Yii2 | TypeScript/Astro/Modern JS |
| API/Headless | GraphQL (built-in) | Full headless (GraphQL or REST) |
Common questions
Can I keep Craft CMS and just replace the Twig frontend with Astro?
Yes. Craft CMS has a built-in GraphQL API that exposes all your content — entries, assets, globals, and Matrix blocks. We remove the Twig template layer entirely and build an Astro frontend that fetches content via GraphQL at build time. Your editors keep using Craft's control panel with no changes to their workflow.
How does Payload CMS compare to Craft CMS for content editing?
Payload's admin panel is React-based with block fields that mirror Craft's Matrix functionality. The editing experience is modern and responsive. Payload's access control system is code-defined, which makes it more flexible than Craft's built-in permissions. The main adjustment for editors is learning a new interface — that typically takes a day or two of hands-on use.
Will my Craft CMS URLs change during the Astro migration?
No. We map your existing URL structure 1:1 in Astro's file-based routing. Craft sites typically use clean URLs without extensions, which Astro handles natively. Any URLs that must change for structural reasons get permanent 301 redirects. We verify every URL post-launch to ensure zero broken links.
How do Craft CMS Matrix blocks translate to Astro components?
Each Matrix block type becomes an individual Astro component. We build a block renderer that receives block data from GraphQL and dynamically maps each block type to its corresponding component. This preserves full editorial flexibility — your content team can keep mixing and matching blocks exactly as before.
What happens to Craft CMS plugins like SEOmatic during migration?
We extract all SEOmatic data — meta titles, descriptions, OG tags, structured data, and sitemap configuration — and migrate it into your Astro build. For Option A, SEOmatic data is queried via GraphQL. For Option B with Payload, we set up equivalent SEO fields in each collection and transfer the data programmatically.
How much faster will my site be after migrating from Craft CMS to Astro?
Most Craft CMS sites score 45-65 on mobile Lighthouse because of PHP rendering and database queries on each request. After migration to Astro with static output on an edge CDN, sites consistently score 95-100 with TTFB under 100ms. That translates to measurably better Core Web Vitals and improved search ranking signals.
Ready to migrate?
Free assessment. We'll audit your current site and give you a clear migration plan — no commitment.
Let's build
something together.
Whether it's a migration, a new build, or an SEO challenge — the Social Animal team would love to hear from you.