Skip to main content
Bit Aura Logo
Web Development

WordPress to Next.js Migration: 5 Things That Break (and How We Fixed Them)

Moving a site from WordPress to Next.js? Here are the five problems we fixed on a live migrated app, from vanishing Tailwind classes to Next.js 15 params.

By the Bit Aura team · 20 Nov 2026 · 4 min read

Two laptops, one showing the WordPress logo and one showing the Next.js logo, with an arrow pointing from WordPress to Next.js.
On this page

Moving from WordPress to Next.js is usually sold on speed, flexibility and modern tooling. All of that is real.

What gets mentioned less is the list of small things that break once the new site meets real devices, real content and a real hosting setup.

We recently worked on a Next.js and TypeScript app for a business council that had moved its site off WordPress. The big decisions had been made. The details were where the work was. Here are the five problems we fixed, and how to avoid them on your own migration.

1. Layouts that look fine on desktop and fall apart on mobile

WordPress themes carry years of responsive fixes. A fresh Next.js build starts with none of them.

The landing page we worked on looked right on a laptop and broke on smaller screens, with cramped sections and elements pushing past the edge. Visitors on phones met a page that felt broken, untrustworthy and hard to use.

Fix: build mobile-first. Start styles from the smallest screen and add breakpoints upward. Then test on real phones, not just a resized browser window.

2. Tailwind classes that vanish in production

This one costs people hours. An image slider worked in development and lost its styling in production.

The cause was class names built from variables, such as bg-${color}-500. Tailwind scans your files for complete class names and only ships the ones it finds. A class assembled at runtime never appears in full, so it is left out of the production CSS.

Fix: write class names out in full, for example in a map from a value to its complete class string, or add them to Tailwind's safelist.

3. Pagination you used to get for free

WordPress paginates archives, categories and post lists out of the box. In a custom app, nothing is paginated until you build it.

On this project, the Events and Reports pages needed pagination added. Without it, long lists load slowly and become hard to browse.

Fix: plan pagination for every list page before launch. Give each page its own URL, such as ?page=2 or /page/2, so it can be shared and crawled, and keep page sizes sensible.

4. Next.js 15 changed how params work

Next.js 15 made route params and searchParams asynchronous. Code that reads params.slug directly, which worked in earlier versions, now needs to wait for it first:

export default async function Page({ params }: { params: Promise<{ slug: string }> }) {
  const { slug } = await params;
  // ...
}

Upgrade without updating these pages and you get warnings or broken routes.

Fix: search the codebase for every use of params and searchParams in pages, layouts and route handlers, and update them in one pass. Next.js also ships a codemod that handles most of it.

5. Environment variables that work locally and fail on Vercel

Everything works on your laptop. The deployed site can't reach its API.

It is usually one of three things:

  • The variable is in your local .env file but was never added to the Vercel project.
  • It was added for Production but not Preview, or the other way round.
  • A value needed in the browser is missing the NEXT_PUBLIC_ prefix, so Next.js never exposes it to client code.

Fix: list every variable the app needs, set each one for the right environments in Vercel, and redeploy after changes. Browser-side values are baked in at build time, so changing them alone doesn't update a live deployment.

The one people forget: who edits the content?

WordPress gives non-developers an admin screen. A custom app may not. On this project, some content lived as JSON in DynamoDB, so changes meant editing that data directly.

That is fine for a developer. It is not fine for a marketing team at six on a Friday evening.

Fix: decide before you migrate how content will be edited: a headless CMS, a simple admin screen, or WordPress kept on as a headless backend.

Should you leave WordPress at all?

Not always. WordPress is still a strong choice for content-heavy sites run by non-developers, with a huge plugin ecosystem behind it.

Next.js makes sense when the site behaves more like an app: logged-in areas, custom data, complex integrations, or performance needs a theme can't meet.

The right answer depends on who runs the site day to day, not on which stack is newer.

The bottom line

Migrations rarely fail on the big decisions. They stumble on small, boring, painful details nobody planned for.

A migration isn't done at launch. It's done when nobody notices it happened.

Bit Aura builds and rescues sites on WordPress and Next.js. Talk to us about your migration.

Planning a migration?

Tell us what you are planning and we will point you to the right next step. No pressure.

Keep reading

Talk to a Real Human, Not a Sales Bot

No pressure. Just a real conversation about how we can improve your digital presence — free of charge.