Skip to content
Now accepting Q2 projects — limited slots available. Get started →
Migration Service

WordPress Multisite to Next.js Migration

Your Multisite Network Is Burning Through Tables Faster Than You Can Query Them

  • Spawns 250+ prefixed tables for a 25-site network with no cross-site querying built in
  • Stores serialized data in wp_options and wp_postmeta that breaks on URL or domain migrations
  • Shares one user table with serialized per-site capabilities that fragment during plugin updates
  • Breaks all subsites simultaneously when a network-activated plugin ships an incompatible update
  • Delivers Lighthouse mobile scores of 35–55 due to serialized data parsing overhead
  • Slows page loads 40–60% compared to standalone WordPress from table-join complexity
  • Ships one Next.js codebase with route-based multi-tenancy serving unlimited locations from a single deploy
  • Enforces data isolation at the database layer with Supabase RLS policies — no app-code authorization bugs
  • Achieves Lighthouse mobile scores of 95–100 and TTFB under 300ms via Vercel Edge and static generation
  • Replaces WordPress network admin with a modern per-location content dashboard your team learns in one session
  • Cuts hosting costs 60–80% by replacing managed Multisite plans with Vercel + Supabase free or pro tiers
  • Eliminates network-wide plugin failures — per-location content updates deploy independently with zero risk

WordPress Multisite made sense in 2012. In 2026, every subsite you add makes the migration you'll eventually need harder. The prefixed tables grow. The serialized data accumulates. The domain mapping plugin adds another dependency. Every year on Multisite is a year of technical debt you'll pay back during migration.

The question isn't whether you'll migrate. It's when.

We've migrated Multisite networks with 5 subsites and networks with 80+. The technical pattern's the same every time: extract prefixed tables, deserialize years of accumulated options data, map shared users to a modern auth system, and build a multi-tenant architecture that actually scales. The difference is scope, not complexity.

Why Leave WordPress Multisite

Multisite networks accumulate specific categories of technical debt that compound over time.

Prefixed Table Sprawl

Every subsite creates its own set of tables: wp_2_posts, wp_2_postmeta, wp_2_options, wp_3_posts, and so on. A 25-site network has 250+ tables. Querying across subsites requires unions across all of them. There's no native cross-site search, no unified content API, no way to aggregate without custom SQL.

Serialized Data Everywhere

WordPress stores complex data as PHP serialized strings. ACF field groups, widget configurations, site URLs, plugin settings — all serialized. These strings encode string lengths (s:23:"https://old-domain.com"), which means you can't do a simple find-and-replace on URLs without breaking the serialization. Every migration that touches serialized data needs proper deserialization, transformation, and re-serialization. No shortcuts.

Shared Users, Fragmented Roles

The wp_users table is network-wide. One user can be an admin on subsite 2, an editor on subsite 5, and a subscriber on subsite 12. Those roles live as serialized arrays in wp_usermeta under keys like wp_2_capabilities. Extracting that into a sane auth model means parsing every user's role per subsite — which is as tedious as it sounds.

Plugin and Update Fragility

Network-activated plugins affect all subsites simultaneously. A plugin update that breaks one subsite breaks the admin for every subsite. Site-specific plugins create version conflicts. The shared codebase means every change is a potential network-wide outage.

Performance Degradation at Scale

Multisite networks with 10+ subsites see 40-60% slower page loads compared to standalone WordPress installations. Serialized data parsing, shared database connections, and plugin overhead all stack up. Lighthouse mobile scores typically land between 35-55. Not great.

What You Get: Next.js + Supabase Multi-Tenant Architecture

The target architecture replaces the entire Multisite network with a single Next.js application backed by Supabase, using Row Level Security for tenant isolation.

Route-Based Multi-Tenancy

Instead of subdomains or subdirectories managed by WordPress, each location gets a clean route: /locations/[slug]. Shared components (navbar, footer, brand elements) render from a single layout. Location-specific content pulls from Supabase filtered by location_id. One codebase, one deployment, unlimited locations.

Supabase RLS for Data Isolation

Row Level Security policies enforce that location managers only see their own data, while network admins see everything. No application-level filtering hacks. The database itself enforces access:

CREATE POLICY "location_isolation" ON posts
  FOR ALL USING (
    auth.uid() IN (
      SELECT user_id FROM user_locations
      WHERE location_id = posts.location_id
    )
  );

This eliminates an entire class of authorization bugs that plague multi-tenant WordPress setups.

Modern Admin Dashboard

Location managers get a purpose-built dashboard: add locations, edit content per location, manage media. No more clicking through WordPress's network admin switcher. No more "Super Admin" vs "Site Admin" confusion.

Our 7-Phase Migration Process

Phase 1: Network Audit (1-2 Weeks)

We map every subsite in your network — URL structure, content volume, plugins used, custom post types, custom fields, domain mapping configuration. We query wp_blogs to enumerate subsites, then crawl each one via REST API and direct database queries.

We identify shared content (network-wide) versus site-specific content. Shared plugins versus site-specific plugins. Custom code in child themes, mu-plugins, and network-activated plugins with custom functionality.

The output is a migration specification document with a subsite-by-subsite content inventory.

Phase 2: Architecture Design (1 Week)

We design the Supabase schema: locations table, content tables with location_id foreign keys, RLS policies per table. We design the Next.js route structure and map every old URL to its new equivalent for 301 redirects.

The admin dashboard gets wireframed: location management, per-location content editing, role-based access. Every decision is documented before we write a line of code.

Phase 3: Content Export (1-2 Weeks)

This is where Multisite migrations get technical. We extract content through two channels:

WP REST API for standard content — authenticated requests per subsite, handling pagination across thousands of posts.

Direct database queries for everything the API can't surface: ACF fields stored in wp_2_postmeta, custom tables created by plugins, serialized options containing critical configuration.

Serialized data gets processed through PHP's unserialize() or Python's phpserialize library. Domain references embedded in serialized options (siteurl, home) are updated before re-serialization. A naive search-and-replace on serialized strings corrupts the length prefixes and breaks everything — we've seen this go wrong, and cleaning it up is brutal.

Media files are downloaded by iterating /wp-content/uploads/sites/[id]/ per subsite. Users are exported from the network-wide wp_users table with per-site capabilities parsed from serialized wp_usermeta entries.

Output: JSON and CSV files per subsite with all content, users, and media inventoried.

Phase 4: Build (2-6 Weeks)

The Next.js application takes shape with route-based multi-tenancy. Supabase tables are created with RLS policies enforced. Shared layout components handle brand consistency. Per-location page templates render localized content zones.

The admin dashboard supports adding locations, editing location content, and viewing aggregated data across all locations. Contact forms, booking integrations, and third-party embeds are rebuilt or migrated.

Timeline depends on complexity: a 5-subsite network with standard pages takes 2 weeks. A 40-subsite network with custom booking systems, membership areas, and complex ACF layouts takes 6.

Phase 5: Content Import (1-2 Weeks)

All content is batch-imported to Supabase with location_id mapping. Every wp_2_ prefixed table maps to location ID 2. Media URLs are rewritten from /uploads/sites/23/image.jpg to Supabase Storage paths or new CDN URLs using regex transformations across all content fields.

WordPress users are mapped to Supabase Auth. Password hashes are preserved — bcrypt rehashing occurs on first login, so users don't need to reset passwords.

We validate by spot-checking 10% of content per subsite against the original.

Phase 6: Redirect Mapping (1 Week)

Every old URL across all subsites gets mapped to its new URL. For domain-mapped subsites, the old domain redirects to the new /locations/[slug] path with a 301. Old subdomains (site2.example.com) redirect to /locations/site2.

We crawl every old sitemap and verify a 301 exists for every URL. New sitemaps are submitted to Google Search Console per former domain.

Phase 7: Launch and Monitor

DNS cutover happens per domain. SSL certificates auto-provision via Vercel. Google Search Console gets new domain properties with fresh sitemaps. We monitor for 30 days: indexing progress, Core Web Vitals baselines, 404 tracking.

The old WordPress database is archived. Hosting is cancelled after a 60-day monitoring period confirms everything's stable.

SEO Preservation Strategy

Multisite migrations carry real SEO risk — you're potentially changing URLs across dozens of domains at once. Our approach:

  • Exhaustive 301 mapping — every URL, every subsite, every domain. No 404s.
  • Sitemap submission per domain — each former domain gets its own sitemap submitted to GSC.
  • Canonical tag consistency — new pages carry proper canonicals from day one.
  • Content parity verification — automated diffing ensures no content is lost or truncated during import.
  • Backlink preservation — we audit backlinks per subsite and ensure 301s capture all inbound link equity.

Clients typically see 25-50% organic traffic improvement within 90 days, mostly from Core Web Vitals gains alone.

Timeline and Pricing

Network Size Subsites Timeline Investment
Small 5-10 4-6 weeks $15,000 - $30,000
Medium 10-25 6-8 weeks $30,000 - $60,000
Large 25-50 8-12 weeks $60,000 - $100,000
Enterprise 50+ 10-16 weeks $80,000 - $150,000+

Pricing scales with the volume of serialized data, custom post types, user role complexity, and third-party integrations per subsite. Networks with heavy ACF usage or custom plugin functionality trend toward the higher end.

Every engagement starts with a free migration audit. We map your network, estimate scope, and give you a fixed-price proposal before any work begins.

How It Works

The migration process

01

Discovery & Audit

We map every page, post, media file, redirect, and plugin. Nothing gets missed.

02

Architecture Plan

New stack designed for your content structure, SEO requirements, and performance targets.

03

Staged Migration

Content migrated in batches. Each batch verified before the next begins.

04

SEO Preservation

301 redirects, canonical tags, sitemap, robots.txt — every ranking signal carried over.

05

Launch & Monitor

DNS cutover with zero downtime. 30-day monitoring period included.

Before vs After

WordPress Multisite vs Next.js + Supabase

Metric WordPress Multisite Next.js + Supabase
Lighthouse Mobile 35-55 95-100
TTFB 1.8-3.5s <0.3s
Database Tables (25 sites) 250+ 15-20 with RLS
Hosting Cost $200-800/mo $40-100/mo
Deploy Risk Network-wide outage from one plugin Atomic deploys with instant rollback
Cross-Site Query Custom SQL unions across prefixed tables Single query with location_id filter
FAQ

Common questions

在迁移过程中,您如何处理 WordPress Multisite 的前缀表?

每个子站点的前缀表(`wp_2_posts`、`wp_3_options` 等)都会被单独查询并映射到 Supabase 中的 `location_id`。我们使用直接 SQL 查询而不是 REST API 来处理复杂数据,如 ACF 字段和序列化的 postmeta — API 根本无法呈现您需要的所有内容,在导入过程中丢失数据不是我们愿意接受的。

wp_options 和 wp_postmeta 中的序列化数据会发生什么?

序列化数据使用 PHP 的 `unserialize()` 或 Python 的 `phpserialize` 库进行反序列化。我们更新反序列化数据中嵌入的 URL 和域引用,然后在将任何内容写入 Supabase 之前验证输出。对序列化字符串进行直接查找和替换会破坏长度前缀 — 我们见过它破坏整个选项集。正确的反序列化是唯一安全的途径。

Supabase 行级安全性如何替代 WordPress Multisite 的站点隔离?

Supabase 中的每个内容行都包含 `location_id`。RLS 策略强制已认证用户只能访问与其分配位置匹配的行。位置管理员仅看到自己的数据。网络管理员可以看到全部。数据库在查询级别强制执行此操作 — 任何应用程序代码都无法绕过它。

迁移后我们的用户需要重置密码吗?

不需要。我们将 WordPress 密码哈希迁移到 Supabase Auth。Bcrypt 重新哈希在首次登录时透明地进行 — 用户使用其现有凭据登录,系统在后台升级哈希。无需密码重置电子邮件,无中断。

您如何为 SEO 处理 Multisite 域映射子站点?

每个域映射子站点都获得全面的 301 重定向到其新路径(例如 `old-domain.com/page` → `newsite.com/locations/slug/page`)。我们为每个前域向 Google Search Console 提交新站点地图,通过重定向保留反向链接权益,并在启动后监控 30 天的索引编制。

WordPress Multisite 到 Next.js 的迁移需要多长时间?

时间取决于网络规模。5-10 个子站点的网络需要 4-6 周。10-25 个子站点的网络需要 6-8 周。25-50 个子站点的大型网络需要 8-12 周。拥有 50+ 个子站点和复杂集成的企业网络需要 10-16 周。每次参与都从审计开始,以便我们在报价前准确范围划定。

我们可以分批迁移子站点而不是一次全部迁移吗?

可以。我们可以分批迁移子站点 — 首先启动高优先级位置,同时其他位置保留在 WordPress 上。Next.js 应用程序本地处理已迁移的位置,同时代理或重定向未迁移的子站点。它降低了风险,但增加了总时间表 2-4 周。

Ready to migrate?

Free assessment. We'll audit your current site and give you a clear migration plan — no commitment.

Get your free assessment →
Get in touch

Let's build
something together.

Whether it's a migration, a new build, or an SEO challenge — the Social Animal team would love to hear from you.

Get in touch →