The order screen at a Stockholm grocery store looks exactly as it did before we rebuilt their website. Same WooCommerce admin, same order emails, same customer accounts, same packing routine every morning. Every page a shopper sees, though, is new: built in Next.js, served from cache, and faster than the old theme ever was.
That was the whole point. Most "WordPress to Next.js" projects try to move everything at once: the design, the code, the database, the orders, the customers, the URLs. Each of those is a place where something can go missing, and they all go live on the same day.
We do it differently.
If your WordPress site takes orders, keep WordPress as the backend and replace only the front end with Next.js. Your data, customers and order flow stay where they are, and you can test the new site against real data for as long as you like before a single visitor sees it.
This is usually called a headless setup. WordPress stops drawing pages and becomes the place where products, prices, stock, orders and content live. Next.js asks it for data over its API and builds the pages people actually visit.
What a full rewrite asks you to move
Before you pick an approach, list what lives inside a working WooCommerce store. Years of order history. Customer accounts, with passwords stored as hashes in WordPress's own format, so they cannot simply be copied into a new system without forcing everyone to reset. Coupons, tax rules, shipping zones. Data that plugins have quietly written into the database over the years. And a team that knows exactly where to click to refund an order.
A full rewrite moves all of that into a new database at once. It can be done, and for some businesses it is the right call. But every item on that list is a migration script, and every script is a chance to lose a customer, an order, or a ranking. When something breaks after launch, you are debugging a new site and a new database at the same time.
Headless removes most of that list. The database doesn't move. The admin doesn't move. Only the part customers look at changes.
When this is the wrong choice
This isn't the cheapest option, and we'd rather say that up front, as a team that builds both ways. You now run two systems: WordPress still needs hosting, updates and backups, and the Next.js front end needs its own hosting and deploys. For a 15-page brochure site with no store and no logins, a well-built WordPress theme with proper caching is cheaper and good enough. If you have no orders or accounts to protect, a clean move to Next.js with a simpler content system can also make more sense than keeping WordPress around.
It also assumes WooCommerce is the right store platform for you. If you are still deciding that, start with our WooCommerce vs Shopify fees breakdown.
Headless pays off when the backend holds something you can't afford to break: orders, customers, bookings, memberships. That's where the risk of a full migration is highest, and where keeping WordPress buys you the most safety.
How we moved a Swedish grocery store this way
Ideal Indiska Livs is an Asian grocery in Stockholm that ships across the Nordics on WooCommerce. It had outgrown its theme, but not its backend. The catalog, the stock, the DHL shipping setup and the staff routines all worked. So we kept them and rebuilt the front end. Here's how the two halves fit together.
WordPress moved to a subdomain. The WordPress install moved to a backend address, something like crm.example.com, and the main domain now points to the Next.js site. Staff log in to the same admin they always used, just at a different address.
Price and stock changes publish themselves. Next.js pages are cached, so they load without waiting for WordPress. When staff change a product in WooCommerce, WooCommerce sends a secure notification to the front end, which refreshes just the pages that show that product. Staff edit a price and the live page updates. Nobody touches code.
Orders still land in WooCommerce. Checkout is built in Next.js. When a payment succeeds, the order is written back into WooCommerce and marked paid. From there it's an ordinary WooCommerce order: same admin screen, same confirmation emails, same fulfillment.
Customer accounts keep working. Login on the new site is checked against WordPress itself. Passwords never move, so there was no mass "please reset your password" email, which is the fastest way to lose returning customers.
URLs didn't change. The new site kept WooCommerce's familiar product and category paths, so every page Google already knew stayed on the same address. The few older links that did change redirect once, straight to their new page.
The backend is hidden from search, except the images. This is the detail most guides miss. Once WordPress sits on a subdomain, it can still show its own old pages, and you don't want Google indexing a second copy of the store. So the backend tells search engines to stay out, with one exception: the uploads folder. Product photos are still served from there. Block that folder too and your images quietly drop out of Google Images and Shopping.
Where the flexibility shows up: SEO, automation and speed
Moving the front end to code we control changed what we could build for the store, more than any single feature did.
SEO. On WordPress, technical SEO is usually a stack of plugins working around each other. On the Next.js side it's just code. The store has sitemaps split by content type, structured data written for each kind of page, localized storefronts for its Nordic markets, and dedicated delivery pages. None of these needed a plugin, so none of them can break on a plugin update.
Automation. The Google Merchant Center feeds (the main product feed, local inventory and promotions) are generated by the Next.js site straight from WooCommerce data, with the store's delivery rules built in. Shipping is priced live at checkout from the carrier. When a product changes in WooCommerce, the feeds, the pages and the sitemaps all follow it, because they all read from the same place.
Speed. Shoppers get pages from cache, not from PHP building them on every request. WordPress only does work when a page is refreshed, or when someone logs in or checks out.
Testing before going live
This is the biggest reason we recommend this approach. Because the new front end reads the same WooCommerce data the live store uses, it can run on a private preview address for weeks before launch, showing real products, real prices and real stock. You aren't testing against a copy that's three weeks out of date. You're testing against the store.
Before we switch anything over, we check:
- Every URL in the old sitemap, plus every page with search traffic in Search Console, returns a 200 or a single 301. No chains, no 404s.
- Test orders placed with Stripe in test mode show up in the WooCommerce admin with the right tax, shipping and stock change.
- An existing customer can log in with their current password and see their order history.
- Editing a price in WordPress updates the preview within seconds.
- Page titles, meta descriptions and structured data match or beat the old site, page by page.
Going live then comes down to two changes: point the domain at the new front end, and move WordPress to its subdomain. Lower the DNS TTL a day before, so the switch spreads fast. When you change WordPress's address, use wp search-replace from WP-CLI with the --precise flag. Never do a find-and-replace on the SQL file. WordPress stores a lot of settings as PHP-serialized strings that record their own length, and a plain text replace breaks them in ways you may not notice until a plugin stops working.
And if something goes wrong, rolling back is the same two changes in reverse. Any orders taken on the new site are already in WooCommerce, because that's the only place they were ever written. With a full rewrite, a rollback means moving orders from the new database back to the old one by hand. With headless, there's nothing to move.
What this does not solve
Headless lowers the risk of the move. It doesn't make WordPress go away.
WordPress still needs updates, backups and security, and its API is now something your live site depends on. If the backend goes down, cached pages keep loading, but cart, checkout and login stop until it's back. Treat it as production, because it is.
Plugins that draw on the page stop doing anything: page builders, pop-ups, review widgets, product add-on fields, and the checkout screens that payment plugins provide. Each one has to be rebuilt in Next.js or replaced. Plugins that work behind the scenes, like shipping labels, invoices and stock sync, keep working. Go through your plugin list before you quote or budget the project, because that list is where the real cost of a headless rebuild sits.
Previewing an unpublished draft from the WordPress editor needs extra setup on a headless site, and content teams notice when it's missing. And if your real problem is a WooCommerce database straining under very high order volume, a new front end won't fix that. It's a backend problem.
The decision
- Does your site hold orders, accounts, bookings or memberships? If not, a simpler full move may be the better option.
- How many of your plugins show something on the page? Each one is rebuild work.
- Does your team work in the WordPress admin every day? If so, keeping it is worth a lot.
- Do your payment methods have an API or JavaScript SDK the new checkout can use?
- Can you list every URL that gets search traffic today? If not, that's the first job, whichever route you pick.
If you want this mapped out for your own site, it's part of our website development work, and for stores we plan it alongside our ecommerce team.
