HubSpot CMS to Next.js: The Complete Migration Guide for 2026
HubSpot CMS is powerful but expensive and limiting. Here's the complete playbook for migrating to Next.js — from HubL templates to React, CRM integration, content export, and SEO preservation.
MigrateLab Team
Migration Experts

Why Teams Are Leaving HubSpot CMS
HubSpot CMS is a compelling product. It bundles hosting, CMS, CRM, marketing automation, and analytics into a single platform. For many teams, that all-in-one promise is what attracted them in the first place. But as your site grows and your needs evolve, the constraints start to outweigh the convenience.
The most common reasons we see teams leave HubSpot CMS fall into three categories: cost, technical limitations, and vendor lock-in. HubSpot CMS Professional costs $400/month ($4,800/year). Enterprise is $1,200/month ($14,400/year). For that money, you're getting a proprietary templating language (HubL), a constrained design environment (Design Manager), and a CMS that requires you to stay inside HubSpot's ecosystem for everything from forms to analytics.
The good news: migrating away from HubSpot CMS doesn't mean abandoning HubSpot entirely. HubSpot's CRM, marketing automation, and sales tools are excellent — and they all have robust APIs that work beautifully with a Next.js frontend. The migration is about replacing the CMS and hosting, not the entire HubSpot ecosystem.
Understanding HubSpot CMS Architecture
Before planning a migration, you need to understand how HubSpot CMS stores and serves content. It's fundamentally different from WordPress or other traditional CMS platforms.
HubL Templates and Modules
HubSpot uses HubL (HubSpot Language), a Jinja2-based templating language, to render pages. Your site's templates live in the Design Manager and consist of HubL files (.html), CSS, and JavaScript. Unlike WordPress themes that you can download as a zip file, HubL templates are tightly coupled to HubSpot's rendering engine. You can't run them anywhere else.
Each HubL template uses tags like {% module %}, {% widget_block %}, and {{ content.post_body }} to pull in dynamic content. These tags have no equivalent outside HubSpot. During migration, every HubL template needs to be rebuilt as a React component. The visual design is preserved, but the rendering logic is completely rewritten.
Custom Modules
HubSpot custom modules are reusable content blocks that editors drag into pages using the page editor. Each module has a HubL template, a module.json definition file with field definitions, and optional CSS/JavaScript. Common custom modules include hero sections, testimonial carousels, pricing tables, and FAQ accordions.
In a Next.js migration, each custom module becomes a React component with props that match the module's field definitions. The page editor functionality is replaced by your CMS's layout builder (Payload CMS blocks, Sanity's portable text, or similar). Content editors still get drag-and-drop page building — it just runs in a different CMS.
HubDB: HubSpot's Relational Database
HubDB is HubSpot's built-in relational database for structured content. Teams use it for things like team member directories, location listings, product catalogs, and event calendars. HubDB tables are accessible via HubL functions like hubdb_table_rows() and through the HubDB API at /cms/v3/hubdb/tables/{tableId}/rows.
During migration, HubDB tables need to be extracted via the API and transformed into collections in your new CMS. Each HubDB table becomes a collection, and each column becomes a field. The data types map fairly cleanly — text, number, date, select, image, and URL columns all have direct equivalents in modern CMS platforms.
Content Export: Getting Everything Out of HubSpot
HubSpot provides several ways to extract content, but none of them give you everything in one step. You'll typically use a combination of approaches:
The HubSpot CMS API
The CMS API is the primary extraction method. Key endpoints include:
- /cms/v3/pages/site-pages — returns all website pages with content, metadata, and template info
- /cms/v3/pages/landing-pages — returns landing pages (separate from site pages in HubSpot)
- /cms/v3/blogs/posts — returns all blog posts with full HTML body, meta descriptions, featured images, tags, and author info
- /cms/v3/hubdb/tables/{tableId}/rows — returns HubDB table data
- /filemanager/api/v3/files — returns uploaded assets from the File Manager
The API returns paginated JSON with up to 100 results per request. For a site with 200 blog posts, you'll need to paginate through 2+ pages. Be aware of HubSpot's API rate limits: 100 requests per 10 seconds for most endpoints. Plan your extraction script to include appropriate delays between requests.
Manual Content Export
HubSpot also offers a manual export option under Settings > Content > Blog > Export blog posts. This generates a CSV with post title, URL, publish date, meta description, and body HTML. It's useful as a backup but doesn't include page content, HubDB data, or file assets.
Design Manager Export
You can download your Design Manager files (templates, modules, CSS, JS) using the HubSpot CLI: hs fetch. This gives you the raw HubL code and module definitions. While you can't run HubL outside HubSpot, these files are valuable during migration as a reference for recreating templates as React components.
HubL Templates to React Components
The template conversion is the core technical work of a HubSpot migration. Here's how the mapping works:
Page Templates
A HubL page template typically contains a layout structure (header, main content area, sidebar, footer) with {% dnd_area %} tags that define editable regions. In Next.js, this becomes a layout component with slot props or children. The {% dnd_section %}, {% dnd_column %}, and {% dnd_row %} directives map to CSS Grid or Flexbox layout components. Your new layout system will actually be more flexible because you're not constrained by HubSpot's grid system.
Blog Templates
HubSpot blog templates use variables like {{ content.post_body }}, {{ content.blog_author.display_name }}, and {{ content.tag_list }}. In Next.js, these become props passed to a blog post component from your CMS query. The blog listing page uses {{ contents }} to loop through posts — in Next.js, you'll fetch posts from your CMS API and render them with React components. Pagination, filtering by tag, and author pages all become straightforward Next.js dynamic routes.
Forms and CTAs
HubSpot forms are embedded in pages using {% module "form" %} tags or JavaScript embed scripts. These forms submit directly to HubSpot's form infrastructure and create CRM contacts. After migration, you have two options:
- Keep using HubSpot forms via embed — add the HubSpot tracking script to your Next.js site and embed forms using HubSpot's JavaScript API. This preserves all form functionality and CRM integration with zero migration effort. Simple and effective.
- Build custom forms that submit to HubSpot — create React form components with your own design system and submit data to HubSpot using the Forms API (POST to /submissions/v3/integration/submit/{portalId}/{formGuid}). This gives you full design control while maintaining CRM data flow.
CRM Integration: Keeping HubSpot Where It Matters
One of the biggest misconceptions about leaving HubSpot CMS is that you lose HubSpot CRM integration. You don't. HubSpot's CRM has a comprehensive REST API that works with any frontend:
- Contact creation and updates: POST to /crm/v3/objects/contacts to create contacts from your Next.js forms
- Deal tracking: Use the Deals API to create and update deals triggered by form submissions or user actions
- Marketing automation: Workflow triggers work off CRM events — they don't care which CMS delivered the page. Contacts created via API trigger the same workflows as contacts from HubSpot forms.
- Analytics tracking: Install the HubSpot tracking script on your Next.js site. Page views, session tracking, and contact activity timelines continue working identically.
- Live chat: HubSpot's chat widget is a JavaScript embed that works on any website. Add the script tag to your Next.js layout and it works immediately.
The key insight: HubSpot CMS is just one of many ways to feed data into HubSpot CRM. The CRM doesn't care where your website is hosted. Every CRM feature you currently use can be maintained through APIs after migration.
Choosing Your CMS Replacement
You need somewhere to manage content after leaving HubSpot's built-in CMS. The right choice depends on your team:
Payload CMS (self-hosted, open source)
Payload is a TypeScript-native headless CMS that runs alongside your Next.js app. It offers a visual admin panel, block-based page building, access control, and versioning. Because it's self-hosted, there are no monthly CMS fees — it runs on the same server as your Next.js app.
Best for: teams with developer resources who want full control and zero CMS subscription costs.
Sanity (cloud-hosted, generous free tier)
Sanity offers a real-time collaborative editing experience with a highly customizable admin interface. Its Content Lake stores structured content that you query with GROQ (Sanity's query language). The free tier supports 3 users and 500K API requests/month.
Best for: content-heavy teams who value the editing experience and real-time collaboration.
Contentful or Storyblok
Contentful and Storyblok are established headless CMS platforms with visual editing capabilities. They're solid choices for teams migrating from HubSpot's visual page builder because they offer similar drag-and-drop experiences.
Best for: non-technical content teams who need an editing experience close to what they had in HubSpot.
URL Structure and 301 Redirects
HubSpot CMS uses specific URL patterns that you need to map carefully:
- Blog posts: /blog/post-slug (configurable but this is the default)
- Landing pages: /landing-page-slug (typically at the root)
- Site pages: /page-slug or nested like /parent/child-slug
- Knowledge base: /knowledge/article-slug
Create a complete redirect map before launch. Use Next.js next.config.js redirects for static mappings or middleware for dynamic rules. Test every redirect with curl -I to confirm 301 status codes. A single missed redirect can cost you months of accumulated search authority for that page.
Migration Timeline: What to Expect
HubSpot CMS migrations are typically faster than WordPress migrations because HubSpot's content structure is more organized and the API extraction is cleaner. Here are realistic timelines:
- Simple marketing site (5-15 pages, no blog): 1-2 weeks
- Marketing site with blog (15-50 pages, 50-200 posts): 2-3 weeks
- Complex site with HubDB, blog, and integrations: 3-5 weeks
- Enterprise site with knowledge base, multiple blogs, and heavy CRM integration: 5-8 weeks
These timelines assume a dedicated migration effort — not a side project squeezed between other work. The biggest variable isn't usually the development work, it's content review and client approval cycles. Build buffer into your timeline for stakeholder review at each stage.
Post-Migration Verification
Before cutting DNS to point to your new site, verify everything:
- Every page and blog post renders correctly with all content intact
- HubSpot forms submit successfully and create CRM contacts
- HubSpot tracking script fires on all pages (verify in HubSpot analytics)
- 301 redirects work for every changed URL
- Meta titles, descriptions, and OG images are preserved
- Sitemap is generated and ready for Google Search Console submission
- HubDB content displays correctly in the new CMS collections
- Live chat widget loads and connects to the correct HubSpot inbox
- Marketing automation workflows still trigger from form submissions
- Page load times are faster than the HubSpot-hosted version (they will be)
The 8-Step HubSpot CMS Migration Process
Audit your HubSpot CMS content and integrations
Catalog all website pages, landing pages, blog posts, HubDB tables, forms, CTAs, and File Manager assets. Document which HubSpot CRM features (workflows, sequences, live chat) are connected to your site. This becomes your migration scope.
Tip: Use the HubSpot CMS API to programmatically count content. GET /cms/v3/pages/site-pages?limit=1 returns totalCount in the response.
Extract content via HubSpot APIs
Write extraction scripts that pull all content from the CMS API, blog API, and HubDB API. Download all File Manager assets. Export Design Manager templates with the HubSpot CLI (hs fetch) for reference during component rebuilding.
Tip: HubSpot rate limits at 100 requests per 10 seconds. Add 150ms delays between requests to stay safely under the limit.
Design your new CMS schema
Map HubSpot content types to your new CMS. Blog posts become a posts collection. HubDB tables become their own collections. Custom module field definitions inform your block schema. Take this opportunity to improve on HubSpot's content structure.
Tip: Review your HubL module.json files — they contain the exact field definitions you need to replicate in your new CMS.
Convert HubL templates to React components
Rebuild each HubL template as a React component. Map dnd_area/dnd_section/dnd_column to CSS Grid layouts. Convert custom modules to React components with typed props. Preserve the visual design while upgrading the rendering technology.
Tip: Start with the blog template — it covers the most pages and validates your content migration approach early.
Import content into the new CMS
Transform extracted HubSpot content to your new CMS format and import it. Convert HubSpot's HTML content to your CMS's content format (Lexical, Portable Text, etc.). Map blog tags, authors, and categories. Import HubDB data into new collections.
Tip: Process content in batches and spot-check 10 random items per batch to catch transformation errors early.
Reconnect HubSpot CRM integrations
Add the HubSpot tracking script to your Next.js layout. Set up form submissions to flow to HubSpot via the Forms API or embed scripts. Verify that workflow triggers, lead scoring, and contact creation all function correctly from the new site.
Tip: Create a test contact through your new forms and follow the entire automation chain to verify nothing breaks.
Set up URL redirects and SEO preservation
Create 301 redirects for every URL that changes. Migrate meta titles and descriptions. Generate a new sitemap. Verify canonical URLs are correct. Test every redirect with curl -I to confirm 301 status codes.
Tip: Export your HubSpot URL map from Settings > Website > Pages to ensure you have every published URL accounted for.
Launch and monitor
Cut DNS to the new host. Submit your sitemap to Google Search Console immediately. Monitor crawl errors, ranking changes, and HubSpot analytics daily for the first two weeks. Keep the HubSpot CMS subscription active for 30 days as a safety net.
Tip: Don't cancel your HubSpot CMS subscription on day one. Keep it as a fallback until you're confident everything is working perfectly.
| Feature | HubSpot CMS | Next.js + Headless CMS |
|---|---|---|
| Monthly cost | $400-1,200/mo | $0-100/mo |
| Template language | HubL (proprietary) | React/JSX (universal) |
| Design flexibility | Design Manager limits | Unlimited (CSS/Tailwind) |
| Page performance | 1.5-3.5s LCP | 0.5-1.5s LCP |
| CRM integration | Built-in | API-based (same features) |
| Marketing automation | Built-in | HubSpot API (same features) |
| Forms | HubSpot forms | Custom + HubSpot API |
| Vendor lock-in | High (HubL is proprietary) | None |
| Developer ecosystem | HubSpot partners only | Any React developer |
| Content editing UX | Good (visual editor) | Good (headless CMS) |
$4,800+
Annual CMS Cost
HubSpot CMS Professional subscription alone
2-3x
Faster Page Loads
Typical improvement after migrating to Next.js
100%
CRM Compatible
HubSpot CRM works fully via API with any frontend
2-5 wks
Migration Timeline
Typical duration for a HubSpot CMS migration
Ready to break free from HubSpot CMS? We handle the technical migration — content, CRM integration, redirects — so you keep what works and lose what holds you back.
Related Resources

HubSpot CMS Migration Cost Breakdown: What to Budget for 2026
HubSpot CMS costs $400-1,200/month. Here's what it actually costs to migrate away, what you'll save, and how fast the investment pays for itself.

HubSpot CMS vs Custom Code in 2026: The Full Comparison
A side-by-side comparison of HubSpot CMS and custom-coded sites on Next.js — covering performance, cost, developer experience, CRM integration, and when each makes sense.

How to Export Your HubSpot CMS Content Without Losing Anything
A step-by-step guide to exporting every piece of content from HubSpot CMS — blog posts, pages, HubDB, forms, files, and metadata — without missing anything.

6 Signs Your HubSpot CMS Site Has Outgrown the Platform
HubSpot CMS works well until it doesn't. Here are the six concrete signs that your site has outgrown the platform and what to do about it.