Skip to content

WordPress to custom code,
with every URL kept.

A plain guide to moving your WordPress site to Astro or Next.js. Astro suits content-heavy marketing sites. Next.js suits sites that act more like an app.

Typical time
3 to 6 weeks
Typical cost
$4,000 to $10,000
Old addresses
Each one redirected

What moves, and what does not

Comes across

  • Page and post text, as files or as content in a headless CMS
  • Images and files, optimised and uploaded again
  • Titles, descriptions and structured data, written into the page templates
  • Categories, tags and authors, kept as content fields
  • Your URLs, kept where we can and redirected where we cannot
  • The look of your site, rebuilt as components

Stays behind

  • Plugins and themes. Custom code does not run WordPress code, so each plugin feature is built or replaced.
  • The WordPress admin. Your team edits in a headless CMS such as Sanity, Contentful or Storyblok, or in files.
  • Page builder layouts. They are rebuilt as components, not converted.
  • Comments and user accounts, unless rebuilt on purpose.
  • Online stores. A WooCommerce shop is a different job. See the ecommerce service.

Protect your search rankings

Custom code gives you full control of addresses, so most can be kept exactly as they are. That makes this the cleanest move for rankings, if the map is done properly.

  1. Redirect map

    List every old address from your sitemap, a crawl, Search Console and analytics. Keep the same path wherever you can. For the rest, add a 301. Astro has a redirects setting in its config, and Next.js has a redirects function in its config. Large lists can also live at your host or at the edge. WordPress addresses often end with a slash, so set the trailing slash rule to match, or every page will redirect once.

  2. Metadata

    Plugins like Yoast wrote your titles, descriptions, canonical tags and structured data for you. In custom code you write them into the page templates and pass in each page's fields. Export your existing titles and descriptions first, then check each template renders its own canonical tag, Open Graph tags and JSON-LD.

  3. Sitemap

    Astro has an official sitemap integration. Next.js can build a sitemap from a file in its app folder. Either way the sitemap is generated at build time, so check that it lists every page and nothing private. Old addresses like /wp-sitemap.xml should redirect to the new one.

  4. Search Console

    Verify your domain in Google Search Console before the move, ideally with a DNS record, because that kind of proof survives a change of platform. After launch, submit the new sitemap and check the key pages with the URL Inspection tool. Then watch the Pages report for errors and the Performance report for drops. Every 404 you find gets a redirect.

Content and CMS mapping

In WordPressIn custom codeNote
PagesPage templatesComponents and a layout, written once and reused.
PostsContent collection or CMS entriesMarkdown files in Astro, or entries in a headless CMS.
Categories and tagsContent fieldsUsed to build the category pages.
AuthorsAuthor entriesReferenced from each post.
Custom post typesTheir own collectionsA team, a portfolio or a list of services.
Custom fields (ACF)Typed fields in a schemaChecked by the build, so a missing field is caught early.
Media libraryOptimised imagesSized and compressed at build time.
Menus and widgetsLayout componentsOne header and footer for every page.

If your team publishes often, choose the editing tool first. A headless CMS gives editors a form to fill in, without touching the code.

Forms and integrations

  • Forms

    Custom code has no form plugin. A form needs a place to send its data: a form service, or a small function that emails you or posts to your CRM. Plan spam protection and test every form.

  • Analytics and tags

    Add Google Analytics, Tag Manager and ad pixels in the layout. Check that events and conversions still fire, and respect your cookie rules.

  • Search and other plugin features

    Write down what each plugin does: site search, popups, redirects, sliders. Each one is built, replaced with a service or dropped.

  • Hosting and deploys

    The site is built and published from a code repository. Every change gets a preview address before it goes live. Choose the host before the build starts.

The steps, in order

  1. Audit the old site

    List every page, post, image, form, plugin and redirect. Record your best pages and their rankings so you can compare later.

  2. Choose the stack

    Astro for a content-heavy marketing site, Next.js for a site with app-like parts, and the editing tool your team will use.

  3. Build the redirect map

    One row for every old address: the new address and the status, keep or 301.

  4. Set up the structure

    Components, routing, the content schema and the deploy pipeline, planned before any page is built.

  5. Build and move content

    Build the templates, bring over the content and metadata, and check each page against the old one.

  6. Connect forms and tools

    Set up forms, analytics, tags, your CRM and email tools.

  7. Test on staging

    Click every link, send every form, check the pages on a phone and run every old URL through the redirect map. Nothing goes live until this passes.

  8. Switch the domain

    Point the domain at the new site by changing its DNS records. The new site is already built and tested, so the change takes minutes to take effect. Keep the old site and its backup until you are sure.

  9. Watch the first 30 days

    Check Search Console for errors, compare traffic and rankings with the weeks before, and fix any address that returns a 404. Our migration service includes 30 days of ranking and traffic monitoring.

Time and cost

Time3 to 6 weeks

Cost$4,000 to $10,000

The range depends on the number of pages, how complex the platform is and any custom needs. We scope it after an audit. Large sites with thousands of pages can take longer. If you also want a new design, it is scoped as a frontend build, which typically takes 6 to 10 weeks.

More migration guides

Tell us what you are building.

Scope, cost, and timeline, mapped with you.

Book a Free Call

Trusted by 150+ teams worldwide