Skip to content

Migrating a classic-theme WordPress to Full Site Editing without breaking SEO

FSE migrations break the SEO surface in three predictable places. The runbook that holds the URL structure, the schema markup, and the meta tags through a classic-to-block-theme conversion.

A publisher site running a heavily customized classic theme has built six years of SEO equity on it. The design team wants to move to a block theme to unlock Full Site Editing for the editorial team. The migration plan looks straightforward — activate a new block theme, port the templates, ship. Two weeks after launch, organic traffic is down 14% and the SEO consultant traces it to schema markup that vanished, breadcrumb URLs that changed shape, and the rendered HTML for product archive pages no longer matching what Google had indexed. FSE migrations are not theme switches. They are a re-render of every URL on the site, and the SEO surface is the first thing to break if you treat it as one.

What’s happening

A classic theme is a set of PHP template files (index.php, single.php, archive.php) plus a functions.php that hooks into WordPress’s render pipeline. A block theme is a set of HTML template files (templates/single.html, parts/header.html) plus an opt-in to the FSE editor surface and Site Editor.

The SEO surface that breaks during the move:

  1. Schema markup injected from PHP. Classic themes commonly inject JSON-LD from wp_head hooks in functions.php or from plugins like Yoast and Rank Math. When you switch themes, the plugin’s output continues — but theme-injected schema disappears unless you port it. Things like Article schema on single posts, Breadcrumb schema, and Organization markup at the site level often live in the active theme.

  2. Breadcrumb HTML and structure. Many classic themes render breadcrumbs from a custom function that walks the taxonomy hierarchy. Block themes can render breadcrumbs through a plugin or a custom block, but the URL structure of intermediate breadcrumb links sometimes changes (e.g., /category/news/ → /news/ depending on permalink config) and Search Console picks up the change as a sitewide structural shift.

  3. Meta tags from outside Yoast/Rank Math. If the classic theme had its own <meta> injection (canonical URLs, robots directives, OG tags for archive pages not covered by the SEO plugin), those vanish on the theme switch.

  4. Template hierarchy differences. A classic theme’s archive-product.php becomes templates/archive-product.html in a block theme — but only if you create it. If you don’t, FSE falls back to the generic archive.html, which may render product archives with a different HTML structure than what Google indexed.

  5. The HTML structure inside the rendered page. Heading levels, semantic landmarks (<article>, <section>, <nav>), and internal anchor links can shift. Google does not lose ranking for a heading-level change in isolation, but stacked with the other four, it adds up.

How to verify

Before touching anything, capture the rendered HTML for a sample of high-value URLs and the schema they emit:

# pick 30 URLs covering the template types: home, single post, archive, category, tag, search, product, etc.
urls=(
  "https://example.com/"
  "https://example.com/some-popular-article/"
  "https://example.com/category/news/"
  "https://example.com/tag/featured/"
  "https://example.com/author/jane/"
)

mkdir -p /tmp/pre-fse
for url in "${urls[@]}"; do
  slug=$(echo "$url" | sed 's|https://||; s|/|_|g; s|^_||; s|_$||')
  curl -s "$url" > "/tmp/pre-fse/${slug}.html"
  # extract schema
  python3 -c "
import json, re, sys
html = open('/tmp/pre-fse/${slug}.html').read()
for m in re.findall(r'<script[^>]*application/ld\+json[^>]*>(.*?)</script>', html, re.DOTALL):
    try: print(json.dumps(json.loads(m.strip()), indent=2))
    except: print('INVALID:', m[:200])
" > "/tmp/pre-fse/${slug}.schema.json"
done

Run the same loop on staging after activating the block theme. Diff the schema and the rendered structure URL-by-URL:

for f in /tmp/pre-fse/*.schema.json; do
  name=$(basename "$f")
  diff -u "$f" "/tmp/post-fse/$name" | head -40
done

For meta tags and canonical URLs:

for url in "${urls[@]}"; do
  echo "=== $url ==="
  curl -s "$url" | grep -iE '<meta|<link rel="canonical"|<title' | head -10
done

For sitemap parity (the SEO plugin should keep emitting the same URLs):

curl -s https://example.com/sitemap_index.xml | grep -oE '<loc>[^<]+' | sort > /tmp/pre-sitemap.txt
# after switch
curl -s https://staging.example.com/sitemap_index.xml | grep -oE '<loc>[^<]+' | sort > /tmp/post-sitemap.txt
diff /tmp/pre-sitemap.txt /tmp/post-sitemap.txt | head

The fix

The migration runbook that holds runs in six phases. None of them happens in production until the previous one has signed off.

Phase 1 — inventory the SEO surface owned by the theme. Search functions.php and the entire theme directory for the following patterns:

cd wp-content/themes/your-classic-theme

grep -rn "application/ld+json" .         # theme-emitted schema
grep -rn "wp_head\|add_action.*wp_head" . # head-injection hooks
grep -rn "rel=.canonical\|robots\|og:" . # meta tag emission
grep -rn "breadcrumb" .                   # breadcrumb logic
grep -rn "get_template_part" .            # template fragments to port

Every match is a thing that has to be ported, replaced by a plugin’s equivalent, or accepted as a deliberate loss. Tabulate them in a checklist.

Phase 2 — build the block theme on staging with the inventory in hand. For each item in the inventory:

  • Schema → move it to a Yoast/Rank Math configuration, a custom plugin, or a register_block_type callback that outputs the JSON-LD. Do not let it sit only in the classic theme’s functions.php.
  • Breadcrumbs → choose a plugin (Yoast breadcrumbs, Rank Math breadcrumbs, or a custom block) and verify the URL structure matches exactly what the classic theme emitted. If it does not match, you have a choice: (a) configure the plugin to match, or (b) accept the change and 301-redirect any breadcrumb URLs that are themselves indexed.
  • Meta tags → SEO plugin should already handle most of these. The exception is anything theme-specific (e.g., <meta name="theme-color">, manifest links) which moves to the new theme’s templates/index.html head injection or a custom block.

Phase 3 — template parity check. For every classic template file (single.php, archive.php, category.php, etc.), create the corresponding block-theme template (templates/single.html, templates/archive.html, etc.). Use the Site Editor to compose them, but commit the resulting HTML files to the repo. Then render the same URL on classic-theme staging and block-theme staging side-by-side and diff the rendered output.

Phase 4 — 301-redirect anything that genuinely changes shape. If the block theme renders breadcrumb intermediate URLs differently, or if you take the opportunity to rationalize URL structure, write the 301s in .htaccess or your Nginx config before the cutover, not after.

# example — breadcrumb URL flattening
location ~ ^/category/(.*)$ {
  return 301 /$1;
}

Phase 5 — submit a new sitemap and validate. Run the staging crawl with Screaming Frog or Sitebulb, fix every 404, 5xx, and schema validation error, then cut over.

Phase 6 — watch Search Console daily for two weeks. Specifically: the Page Indexing report (look for “Crawled - currently not indexed” creep), the Core Web Vitals report (block themes can change LCP if the hero image loads differently), and the Schema enhancement reports (Articles, Breadcrumbs, Products).

The mistake to avoid: doing the cutover on a Friday and assuming Monday will be normal. Schema and indexing changes take 5-14 days to fully propagate through Search Console. The first week after cutover is when you find out which inventory item you missed.


Stack Harbor runs FSE migrations for publisher and commerce WordPress sites under the Enterprise WordPress operating model, including the SEO parity checklist and the post-cutover monitoring. If you’re scoping a classic-to-block-theme conversion and want the SEO surface protected, we can run the migration end-to-end.