Leaving WordPress: Astro or Next.js?

Published: · Lucas Kleipoedszus
Decision chart: keep WordPress, Astro or Next.js, each as a full migration or headless

Moving off WordPress means answering two separate questions: which framework? and does WordPress stay as the editor? This guide helps with both. The hands-on steps are in WordPress to Astro and WordPress to Next.js.

The short answer

  • Astro when the site mostly presents content: company site, blog, documentation, landing pages. Astro ships HTML without JavaScript by default and only loads interactivity where a component needs it.
  • Next.js when the site is closer to an application: customer area, configurator, login, per-user data, content that changes per request. Next.js is a React framework with server components, caching and API routes.
  • Keep WordPress when a team edits content daily, plugins do real work (shop, memberships, bookings) and nobody should touch code. Switching frameworks does not fix problems that really come from hosting, the theme or plugin sprawl.

Full migration or headless?

Whatever the framework, there are two routes.

Full migrationHeadless
WordPress afterwardsswitched offstays as the editor
Content livesas files in the Git repositoryin the WordPress database
Editingthrough code, pull requests or a Git-based CMSin wp-admin, as before
Ongoing upkeepno PHP, no plugin updatesWordPress still needs maintenance
Fits whencontent changes rarely or developers maintain iteditors know WordPress and want to keep it

Rule of thumb: if content changes less than once a week and whoever edits it can work with Git, the full migration is simpler. If an editorial team publishes regularly, headless is usually the honest choice.

The criteria in detail

Interactivity

Count the places where the site does more than show content. A contact form, an image gallery and a cookie notice are little. A login with customer data, a configurator or a dashboard are a lot. Little points to Astro, a lot to Next.js.

How fresh content must be

Both frameworks can generate pages at build time. When new content comes from WordPress, the site then has to be rebuilt or its cache refreshed:

  • Astro builds static files and, when headless, needs a deploy hook that starts a new build after publishing. Single pages can also render per request with export const prerender = false, which requires a server adapter.
  • Next.js can refresh specific data on demand (revalidateTag) without rebuilding the whole site. That pays off with many hundreds of pages or frequent changes.

Team and maintenance

Next.js projects require React skills. Astro components are closer to HTML and easier to maintain with less background, while still able to include React, Vue or Svelte components. Ask who will maintain the site in two years, not only who builds it.

Hosting

A static Astro site runs on any web host or CDN. Next.js features such as revalidation and server components need a Node server or a platform that supports Next.js. Decide where the site will run before you start.

What stays the same on both routes

Most migration problems have nothing to do with the framework:

  1. URL inventory: every old URL needs a target. Without redirects the site loses rankings and backlinks.
  2. Redirects with a status code: 301 or 308, server-side. A meta refresh redirect is a stopgap.
  3. Carry metadata over: titles, descriptions and canonicals from Yoast or Rank Math belong in the export.
  4. Forms, comments, search: whatever a plugin did needs a replacement or a deliberate decision to drop it.
  5. Measurement: save Search Console and analytics data before the move so you can compare afterwards.

Common mistakes

  • Disguising a migration as a redesign. Change framework, design, copy and URL structure at once and you will not know what caused a ranking drop. Move first, then rebuild.
  • Headless without a preview plan. Editors expect to see drafts before publishing. The new frontend has to build that explicitly.
  • Leaving the old WordPress frontend open. When headless, the old theme must not stay public and indexable, or every page exists twice.

Next