Squarespace to Code: How to Migrate to Astro, Next.js, or Payload CMS
Leaving Squarespace for clean code means moving content the export drops, rebuilding the design, and choosing a destination: Astro, Next.js, or Payload CMS. The destination barely changes price. AI-editability and lock-in change your 5-year cost.
MigrateLab Team
Migration Experts

Why leaving Squarespace is different from leaving Webflow
Squarespace is a mature, content-first website builder. Most Squarespace sites are marketing sites, blogs, portfolios, or small stores, not complex apps. That shapes the migration: the hard part is rarely logic, it is content and design, because Squarespace deliberately couples your writing, your layout, and your styling into one closed system that does not come apart cleanly.
The instinct is to reach for the export button and assume you have a backup. You do not. Squarespace's export is a partial WordPress-format XML file. It carries your written words and some pages, but it drops galleries, products, forms, custom code, and almost all of your design. Knowing exactly what survives the export, and what you have to re-extract by hand, is the difference between a clean migration and a launch where half the site is missing.
This guide is the map. It covers what the export actually gives you, how to choose a destination (Astro, Next.js, or Payload CMS), what reliably breaks, what it costs, and the step-by-step playbook to do it without losing rankings.
What the Squarespace export actually includes (and drops)
Squarespace gives you one export path: Settings, then Advanced, then Import / Export, which produces a WordPress-format XML file. It is genuinely useful, but only for a slice of your site.
What the export includes: blog posts, basic pages, text blocks, image blocks, and embed blocks. That is most of your written content, which is the part you least want to retype.
What the export drops, and what you therefore have to re-extract by hand: product and Commerce data, all style and layout, gallery blocks, summary blocks, audio and video blocks, album pages, event pages, product pages, form block content and configuration, and any custom code you injected. It also exports only one blog page if you run several. In practice this means the export is a head start on your text, never a complete backup of your site. A real migration treats the XML as a draft and re-extracts the missing pieces from the live, rendered pages before the Squarespace subscription lapses.
Choosing your destination: Astro vs Next.js vs Payload CMS
The destination matters less for price than people expect, and more for fit. Here is how to choose.
Astro: the default for content sites
If your Squarespace site is a marketing site, blog, or portfolio, Astro is usually the right answer. It is built for content-driven sites, ships zero JavaScript by default, and turns each blog post into a simple Markdown or MDX file in a content collection. Images get optimized at build time. The result is typically sub-second load times, a clean Git repo, and a site that passes the Core Web Vitals Squarespace's render path often fails. For the large majority of Squarespace sites, Astro is the cheapest, fastest landing spot.
Next.js: when the site is really an app
Choose Next.js when your site does more than present content: gated areas, dashboards, search, serious e-commerce, or interactive features. Pages become React components, Squarespace's built-in features get replaced with dedicated services, and a data layer (a headless CMS or a database via Prisma) backs the dynamic parts. Next.js ships more JavaScript than Astro, which is the right trade only when you genuinely need the interactivity. For a static blog or brochure site, Astro is the better and cheaper target.
Payload CMS: when editors need an admin UI
If non-technical people must edit content daily without touching code, pair your frontend with Payload CMS. Squarespace pages and collection items map to Payload Collections with typed fields, references, and rich text, and editors get a clean admin UI with drafts, autosave, and live preview. The reason to prefer Payload over re-hosting on another builder is ownership: Payload is open source, self-hosts for effectively zero licensing, and keeps your schema, content, and frontend in one TypeScript repo, which is what makes the whole site editable by AI tools.
The pattern across all three: the migration mechanics are nearly identical, and the destination barely changes the one-time price. What it changes is your long-term cost and freedom.
What breaks when you leave Squarespace
Every Squarespace migration hits the same predictable rough edges. Scope these first, because they cause the surprises.
Commerce does not come out cleanly. Squarespace Commerce products, variants, customers, and orders are not in the export at all. If you ran a store, products have to be re-extracted (often via the product CSV where available, plus manual work for the rest), and checkout has to be rebuilt on a dedicated service such as Stripe or a headless commerce platform. This is the single most expensive part of a Squarespace migration.
Galleries, summaries, and media blocks vanish. Gallery blocks, summary blocks, and audio and video blocks are excluded from the export. Image-heavy portfolios and galleries usually need their assets pulled directly from the CDN and rebuilt as components.
Forms stop working. Form blocks and their configuration do not export. Every contact form, signup form, and survey has to be rebuilt and re-wired to an email service or backend endpoint.
Custom code injections are gone. Anything you added through Code Injection or code blocks is not in the export. Tracking scripts, custom CSS, and embeds must be inventoried from the live site and re-added intentionally.
Design and layout do not transfer. The export carries no styling or layout. The new site's design is rebuilt to match, which is usually a feature, not a bug, because it produces clean, semantic, fast code instead of Squarespace's heavier markup, but it is real work to budget for.
URLs change unless you plan for it. Squarespace's slug patterns will not match your new structure automatically. Without 301 redirects on every old URL, you lose rankings.
What it costs and how long it takes
For a typical 20 to 60 page Squarespace site, budget $5,000 to $18,000 and 3 to 7 weeks. The drivers are page count, blog volume, design complexity, and whether you ran Squarespace Commerce. A simple brochure site with no store sits at the low end. A content-heavy blog with a store sits at the high end, because re-extracting products and rebuilding checkout adds the most cost and time of any single piece.
The destination (Astro, Next.js, or Payload) barely moves the price, because the expensive work, re-extracting dropped content, rebuilding the design, re-hosting assets, and SEO-safe redirects, is the same no matter where you land. What the destination changes is the recurring bill and the freedom afterward: clean code you own removes the monthly Squarespace fee and the lock-in, and makes the site AI-editable.
The step-by-step migration playbook
The process is the same regardless of which destination you choose. Inventory the live site first, export what you can, re-extract everything the export drops, rebuild content and design in code, then redirect and launch. The detail that protects your business is the redirect map: do not cut DNS until every old Squarespace URL points at its new home.
Where to go next
If your Squarespace site is a content or marketing site, start by reading why Astro is the best framework for marketing websites, then the SEO migration survival guide so you protect rankings through the move. If non-technical editors must own content, the Payload CMS playbook from our Webflow guide applies almost directly, since the destination work is the same.
Not sure which destination fits your site, or worried about what the export will drop? That is exactly what a free migration review is for. We look at your actual Squarespace site, tell you what the export will and will not carry, and recommend honestly whether Astro, Next.js, or Payload is the right landing spot.
$5K-$18K
Typical Migration Cost
For a 20 to 60 page Squarespace site, roughly the same regardless of destination
3-7 weeks
Typical Timeline
Re-extraction, design rebuild, asset re-hosting, and SEO-safe redirects
$0
CMS Licensing on Payload
Open source and self-hosted, versus the recurring Squarespace plan you leave behind
1 file
What the Export Gives You
A partial WordPress-format XML that drops galleries, products, forms, and design
| Feature | Astro | Next.js vs Payload CMS |
|---|---|---|
| Best for | Content sites, blogs, portfolios | Apps (Next.js) or editor-driven content (Payload) |
| JavaScript shipped | Zero by default | More (Next.js); admin UI overhead (Payload) |
| Blog content model | Markdown / MDX collections | React + data layer (Next.js); Collections (Payload) |
| Admin UI for non-tech editors | Needs a paired CMS | Payload ships a full admin UI |
| Dynamic and interactive features | Limited by design | Next.js handles app-like features |
| Hosting cost | Static, often free tier | Low (Next.js); self-host Payload for free |
| AI-editable code you own | Yes (Git repo) | Yes for both (Git repos you own) |
| Cheapest target for a typical Squarespace site | Usually yes | Only if you need apps or an editor UI |
The Squarespace export is not a site backup. It drops galleries, products, forms, custom code, and your entire design. Download every image and re-extract the missing content from the live pages before your subscription lapses, because the CDN URLs stop being reliable once the site is gone.
Leaving Squarespace for code: pros and cons
Pros
- +Sub-second load times from Astro or Next.js instead of Squarespace's heavier render path
- +Clean, semantic code in a Git repo you fully own, with real version control and staging
- +AI-editable: Claude Code and Cursor can read and change the whole site
- +No recurring Squarespace plan, and no template or block limitations
- +Core Web Vitals you can actually pass, which helps rankings and AI-search visibility
Cons
- -The export is partial, so galleries, products, forms, and custom code must be re-extracted by hand
- -Design and layout are rebuilt rather than ported (cleaner result, but real work)
- -Squarespace Commerce is the most expensive piece: products and checkout have to be rebuilt
- -You own hosting, backups, and updates (Payload self-host) instead of Squarespace handling it
- -It is a real project: 3 to 7 weeks and $5K to $18K for a typical site
How to migrate from Squarespace to code
Inventory the live site, not just the dashboard
Crawl every page and list what exists: pages, blog posts, galleries, forms, products, custom code injections, and every external integration. This is your source of truth, because the export will not show you what it is about to drop.
Tip: Use a crawler to capture the full URL list now. You will need it later to build the redirect map.
Export the XML, then treat it as a draft
Run Settings, Advanced, Import / Export to get the WordPress-format XML. It covers blog posts and basic pages. Re-extract everything it drops: galleries, products, forms, audio and video, and any custom code, directly from the live pages.
Tip: If you run multiple blog pages, the export only includes one of them. Export and re-extract each blog separately.
Re-host every asset off the Squarespace CDN
Download all images, files, and media and store them in your new repo or asset host. Squarespace CDN URLs become unreliable once the subscription lapses, so this is a hard deadline, not an optional cleanup step.
Tip: Astro and Next.js optimize locally hosted images at build time, which is a free performance win over Squarespace's served images.
Rebuild content and design in your destination
Convert posts to Markdown or MDX in Astro, React pages in Next.js, or Collections in Payload. Rebuild the layouts as clean components, and replace built-in features (forms, members, commerce) with dedicated services.
Tip: Pick Astro for content sites, Next.js for app-like sites, and pair with Payload when non-technical editors need an admin UI.
Map redirects, verify, and launch
Map every old Squarespace URL to its new path with 301 redirects, preserve title tags and meta descriptions, submit a fresh sitemap, and only then cut DNS. Keep the Squarespace site live for a short overlap so you can compare pages side by side.
Tip: Skipping redirects is the single most common way a migration tanks rankings. Never cut DNS without the redirect map verified.
1---2// Squarespace blog post -> Astro content collection3// src/content/config.ts4import { defineCollection, z } from 'astro:content'56const blog = defineCollection({7 type: 'content',8 schema: z.object({9 title: z.string(),10 pubDate: z.coerce.date(),11 description: z.string(),12 // Squarespace slug pattern, preserved for 301 redirects13 legacyPath: z.string(), // e.g. '/blog/my-post-title'14 cover: z.string().optional(),15 tags: z.array(z.string()).default([]),16 }),17})1819export const collections = { blog }
Thinking about leaving Squarespace?
Get a free migration review. We look at your actual Squarespace site, tell you exactly what the export will and will not carry, and recommend honestly whether Astro, Next.js, or Payload CMS is the right landing spot for your content.
Frequently asked questions
- How do I migrate from Squarespace to a headless CMS?
- Export what you can from Squarespace (Settings, then Advanced, then Import / Export gives you a WordPress-format XML covering blog posts and basic pages), then treat that file as a starting point rather than a complete backup, because it drops galleries, products, forms, and custom code. Rebuild your content model in a headless CMS such as Payload, import the posts and pages while remapping IDs, re-host every image off Squarespace's CDN, rebuild the frontend in Astro or Next.js, and put 301 redirects in place for every old URL before launch. For a 20 to 60 page site, expect 3 to 7 weeks. The headless CMS you choose changes the import step but not the overall shape of the project.
- Can I migrate from Squarespace to Payload CMS?
- Yes, and it is the best fit when non-technical editors must own day-to-day content. Squarespace pages and collection items map to Payload Collections with typed fields, references, and rich text. You rebuild each content type as a Payload Collection in TypeScript, import items through Payload's Local API, and re-host media off the Squarespace CDN. The payoff Squarespace cannot match is that Payload puts your schema, content, and frontend in one repo you own, so AI tools like Claude Code and Cursor can edit the whole site. The Squarespace export is lossy, so most migrations re-extract blog and gallery content directly from the rendered pages rather than trusting the XML alone.
- How do I migrate from Squarespace to Astro?
- Astro is the strongest destination for a content-driven marketing or blog site, which is what most Squarespace sites are. You export the WordPress-format XML, convert each blog post to a Markdown or MDX file in an Astro content collection, rebuild the page layouts as Astro components, and re-host images locally so they get optimized at build time. Astro ships zero JavaScript by default, so the result is typically sub-second load times versus Squarespace's heavier render path. If you later need a CMS UI for editors, Astro pairs cleanly with a headless CMS, so choosing Astro now does not lock you out of adding Payload later.
- How do I migrate from Squarespace to Next.js?
- Choose Next.js when your site is more than a marketing site: gated content, dashboards, search, real e-commerce, or anything app-like. You export your content, rebuild pages as React components, replace Squarespace's built-in features (forms, members, commerce) with dedicated services, and wire up a data layer (a headless CMS or a database with Prisma). Next.js handles dynamic and interactive features that Astro is not designed for, at the cost of shipping more JavaScript. For a primarily static blog or brochure site, Astro is usually the better and cheaper target. Either way, the content export and SEO redirect work is identical.
- What does it cost to migrate off Squarespace?
- For a typical 20 to 60 page Squarespace site, budget $5,000 to $18,000 and 3 to 7 weeks. The range is driven by page count, blog post volume, custom design complexity, and whether you ran Squarespace Commerce. The destination (Astro, Next.js, or Payload) barely moves the price, because the expensive work is the same everywhere: re-extracting content the export drops, rebuilding the design, re-hosting assets, and putting SEO-safe redirects in place. A simple brochure site with no store sits at the low end; a content-heavy blog with a Squarespace store sits at the high end. Commerce migration adds the most cost because products, customers, and orders do not export cleanly.
- Does Squarespace let you export your whole site?
- No. Squarespace's export produces a WordPress-format XML file that covers blog posts, basic pages, text blocks, embed blocks, and image blocks. It explicitly does not include product and Commerce data, style and layout, audio and video blocks, gallery blocks, summary blocks, album and event and product pages, form block content, or any custom code you injected. It also only exports one blog page if you have several. So the export is a useful head start for your written content, but it is never a complete site backup, which is why a real migration re-extracts the missing pieces from the live pages.
- Will I lose my SEO rankings migrating off Squarespace?
- Only if redirects are skipped. The biggest SEO risk is URL changes: Squarespace uses specific slug patterns (for example /blog/post-title and collection paths), and if your new URLs differ, every old link and ranking points at a 404. The fix is to map every old Squarespace URL to its new path with 301 redirects, preserve title tags and meta descriptions, keep your heading structure, and submit a fresh sitemap. Done correctly, a migration usually improves rankings, because the new site loads faster and passes Core Web Vitals that Squarespace's render path often fails. Done without redirects, you can lose most of your organic traffic overnight.
- Can AI tools like Claude Code edit a site after migrating from Squarespace?
- Yes, and that is the main reason to leave. Squarespace's design and logic live inside a closed visual editor that AI coding tools cannot read or modify. Once your site is clean Astro, Next.js, or Payload code in a Git repo you own, tools like Claude Code and Cursor can read the whole codebase and make changes, add pages, fix bugs, and ship features in minutes. Content edits, design tweaks, and new sections that meant filing a request or wrestling the Squarespace editor become a short prompt against code you control.
Related Resources

Why No-Code Platforms Score Poorly on PageSpeed (And What Your Options Are)
An honest look at why Webflow, Wix, Squarespace, and WordPress page builders consistently score low on PageSpeed Insights — with data — and what you can realistically do about it.

Why Astro Is the Best Framework for Marketing Websites in 2026
Astro was built for exactly what most marketing teams need: fast, content-driven sites that actually rank. Here's why it's winning the framework war for non-app websites.

Webflow to Payload CMS: The Complete Migration Guide for 2026
Migrating from Webflow CMS to Payload keeps the design-first mental model — Collections, references, rich text — and adds AI-editable code, TypeScript end-to-end, and free hosting. Typical: $8K–$25K and 4–8 weeks for a 50–100 page site.

The SEO Migration Survival Guide: Keep Your Rankings When Switching Platforms
Platform migrations destroy SEO rankings if done wrong. Here's the checklist we use on every migration to protect (and improve) organic traffic.