Skip to content

Yoast SEO indexables: what wp_yoast_indexable is, when to reindex, and the fixes that recur

Learn how to fix the Yoast SEO problems that keep coming back, such as a sitemap that doesn't match your posts or a meta description that resets itself. This guide shows you how to check whether the wp_yoast_indexable table is out of date and how to rebuild it safely.

This guide is for WordPress site owners and admins who use Yoast SEO and keep running into the same few problems. You may see a sitemap that doesn’t match what’s published, a meta description that quietly reverts, or a primary category that resets itself. Most of these trace back to wp_yoast_indexable, the database table where Yoast keeps a ready-made copy of the SEO data for every post, page and term. That copy holds the title, the meta description, the canonical URL (the address search engines should treat as the main one) and the robots settings (whether search engines may index the page), so WordPress doesn’t rebuild them on every page view. When the copy falls out of sync with your real content, the fix follows three steps: confirm the table is actually stale, rebuild it the right way (Yoast calls this reindexing), and find which known cause made it drift.

What you’ll accomplish

  • Understand what an indexable is, what problem it solves, and where its row lives (wp_yoast_indexable).
  • Confirm from the database whether your indexable table has actually gone stale or corrupt, instead of guessing.
  • Run the rebuild the right way, through the dashboard or WP-CLI, and know roughly what to expect on a large catalog.
  • Fix the issues that recur on every audit: primary category drift and an overwritten meta description or title.
  • Recognize when the problem is bigger than this page and belongs on the migration-rebuild or sitemap-conflict guides instead.

Prerequisites

  • Yoast SEO 14.0 or later — that’s when the indexables architecture, and the wp_yoast_indexable table itself, replaced the older on-the-fly computation. Written against Yoast SEO 27.x (current as of August 2026); menu wording drifts between major versions, so search the admin for “SEO data” if a screen doesn’t match.
  • SSH access with WP-CLI, plus a way to run database queries — wp db query is enough. The wp yoast commands register automatically once WP-CLI can see the plugin; no separate CLI package needed.
  • Admin access to wp-admin for the dashboard route.
  • Know whether more than one SEO plugin is active — Rank Math, All in One SEO, and SEOPress all compete with Yoast for the same output: wp plugin list --status=active --field=name | grep -iE 'seo|sitemap'.
  • Assume the default wp_ table prefix below; substitute your own if different (wpstg0_yoast_indexable on a prefixed staging clone, for example).

How it works

Before Yoast SEO 14.0, every front-end request recomputed the title, meta description, and canonical URL from scratch: pull the post, walk its taxonomy terms, apply the site-wide templates, assemble the tags — every time, for every visitor. Cheap for one page view, expensive in aggregate on real traffic. Yoast 14.0 introduced the indexables system to fix that: a dedicated table, wp_yoast_indexable, holding one denormalized row per post, page, term, archive, and author, with the title, meta description, canonical, robots directives, and primary-term data already computed.

The row is written the moment content is saved — Yoast listens for the save event and updates that object’s row synchronously. If a request ever hits an object with no row yet, Yoast generates one on the spot (“lazy generation”) rather than serving nothing, which is why a brand-new post usually indexes itself without you doing anything. The sitemap, <head> output, and breadcrumb logic all read from this table instead of recomputing — the entire performance win, and also the entire failure mode, since a stale row keeps getting served exactly as confidently as a correct one.

Diagram contrasting how a Yoast indexable is produced and consumed under the current architecture against the pre-14.0 approach of recomputing metadata on every request, with two annotated points where a saved indexable row can go stale: direct database writes that skip the save event, and migrations that copy old rows verbatim

Two things bypass the save event, and both are common on a managed fleet. A direct database write — a SQL import, wp search-replace, a manual UPDATE on wp_posts — changes content without calling WordPress’s save machinery, so the row is never touched. A migration is the same mechanism at larger scale: a restored database dump brings its indexable rows along verbatim, canonical URLs and permalinks baked in from wherever the site used to live. Neither case throws an error — the site just quietly serves the old state until someone rebuilds the table.

Yoast’s own indexables functional specification and WP-CLI reindex command reference cover the mechanism in more depth than fits here.

Step-by-step

1. Confirm the table is actually stale before you touch anything. The fastest signal is a row-count mismatch:

wp db query "SELECT COUNT(*) FROM wp_yoast_indexable WHERE object_type='post'"
wp db query "SELECT COUNT(*) FROM wp_posts WHERE post_status='publish' AND post_type IN ('post','page')"
+----------+     +----------+
| COUNT(*) |     | COUNT(*) |
+----------+     +----------+
|     4812 |     |     4820 |
+----------+     +----------+

A gap of a handful is normal — drafts get cleaned up, and lazy generation means a freshly-published post can briefly lag. A gap in the hundreds, or a count larger than your published total, is the real signal — the second usually means rows for deleted content never got pruned. Spot-check content too:

wp db query "SELECT object_id, permalink FROM wp_yoast_indexable WHERE object_type='post' ORDER BY object_last_modified DESC LIMIT 5"

If permalink shows an old domain or a URL structure you changed months ago, the row is stale regardless of what the count said.

2. Reindex from the dashboard for anything short of a large catalog. In wp-admin, open Yoast SEO → Tools, find the SEO data panel, and click Start SEO data optimization. It’s the easiest route and Yoast’s default recommendation — but it runs through the browser, so it depends on the tab staying open and the request not timing out, which becomes the limiting factor past the tens of thousands of objects.

3. Reindex from WP-CLI for anything large, or anything you want to script. Plain wp yoast index fills in only what’s missing — the safe, incremental option:

wp yoast index
All 4820 posts are already indexed!
All 42 terms are already indexed!

To force a full rebuild — after confirming staleness in step 1, or after a migration — add --reindex. It clears every existing row first, then rebuilds all of them, and it asks for confirmation:

wp yoast index --reindex
This will clear all previously indexed objects. Do you want to continue? [y/n]

Add --network on multisite to reindex every site, not just the current one. There’s no published benchmark for how long a full --reindex takes — it scales with total indexable objects and your host’s PHP limits, so budget minutes on a small site and hours on a catalog in the hundreds of thousands, and run it during low-traffic hours. For cron or scripting, WP-CLI’s global --yes flag skips the confirmation:

wp yoast index --reindex --yes

If you’re unsure what else the command supports on your Yoast version, ask WP-CLI directly rather than guessing: wp yoast index --help or wp help yoast.

4. Diagnose primary category drift. Yoast stores the chosen primary term in post meta, under _yoast_wpseo_primary_category for the default category taxonomy (_yoast_wpseo_primary_<taxonomy_slug> for other hierarchical taxonomies). Bulk imports and bulk-edit tools frequently leave this key empty, and Yoast then falls back to whichever category sorts first alphabetically for breadcrumbs and canonicals — rarely the one you meant.

wp post meta get 1284 _yoast_wpseo_primary_category

An empty result is the tell. Set it once you know the correct term ID:

wp term list category --fields=term_id,name --format=table
wp post meta update 1284 _yoast_wpseo_primary_category 14
+---------+----------+
| term_id | name     |
+---------+----------+
|      14 | Hosting  |
+---------+----------+
Success: Updated custom field '_yoast_wpseo_primary_category'.

For a bulk fix, loop the same wp post meta update command over a list of post IDs rather than editing one at a time in the Bulk editor.

5. Diagnose an overwritten meta description or title. Two causes, two checks. First, whether the theme prints its own tag alongside Yoast’s instead of going through it at all:

curl -s https://example.com/some-post/ | grep -c '<meta name="description"'

More than 1 means header.php or a theme option is hardcoding a tag independently of Yoast — grep -rn 'meta name="description"' wp-content/themes/your-theme/ finds it.

Second, if there’s one tag but wrong content, something is filtering Yoast’s own output through the standard wpseo_title and wpseo_metadesc filters, which any plugin or mu-plugin can hook:

grep -rn "add_filter( *'wpseo_metadesc'" wp-content/

If a dynamically-registered closure doesn’t show up in the grep, ask WordPress which callbacks are attached and at what priority instead:

wp eval 'var_dump( isset( $GLOBALS["wp_filter"]["wpseo_metadesc"] ) ? $GLOBALS["wp_filter"]["wpseo_metadesc"]->callbacks : "nothing hooked" );'

Whichever callback runs at the highest priority number wins — that tells you which plugin or theme code to fix.

6. Sitemap disagreeing with what Google actually crawled. This page covers indexables, not sitemap generation, and the two failure shapes here have dedicated guides. A near-empty /sitemap_index.xml body or a 500 is a fatal error during rendering — see why Yoast SEO sometimes returns a blank XML sitemap. A populated sitemap that disagrees with Search Console because more than one plugin generates sitemap output belongs to WordPress sitemap conflicts when multiple plugins are active. A quick first check either way:

curl -sI https://example.com/sitemap_index.xml | head -3
curl -s https://example.com/sitemap_index.xml | wc -c

A 200 with a body of a few hundred bytes or more is healthy; a 200 with a near-empty body is the blank-sitemap case.

Not sure which of these you actually have? The decision tree below maps the symptom a site owner reports to the check that confirms the cause, including the two cases that hand off to a separate guide.

Decision tree routing four reported symptoms (wrong description in Google, empty or wrong sitemap, changes not showing on the site, wrong category in breadcrumbs) to the diagnostic check that confirms the cause, with two branches terminating in dedicated guides for sitemap conflicts and post-migration indexable rebuilds

Validate it works

After a reindex, re-run the count comparison from step 1 and confirm the gap closed. Then confirm the front end reflects it on a post you know was affected:

curl -s https://example.com/the-post-that-was-wrong/ | grep -oE '<title>[^<]*</title>|<meta name="description"[^>]*>'

If you fixed a primary category, confirm the breadcrumb and canonical now reference the right term. If the fix was a sitemap issue, re-run the curl from step 6 and check the URL count against Search Console’s coverage report over the next few days — sitemap changes are read on Google’s schedule, not yours.

Troubleshooting

The --reindex command asks for confirmation and hangs in a script or cron job. It’s waiting on stdin for y/n. Add --yes to auto-confirm; to survive a dropped SSH connection on a large site: nohup wp yoast index --reindex --yes > reindex.log 2>&1 &.

Two SEO plugins are active and the indexable table looks fine, but live output still doesn’t match it. If Rank Math, AIOSEO, or SEOPress is also active, one of them is winning the output filters regardless of what Yoast computed. Deactivate the one you don’t intend to use — running two SEO plugins side by side isn’t supported by any of them.

Primary category keeps resetting after every bulk edit, even after you fix it manually. The bulk-edit tool or import script probably isn’t preserving _yoast_wpseo_primary_category on save — a common cause is a CSV importer writing through wp_insert_post() without carrying custom meta forward. Check what the tool actually writes before assuming Yoast is at fault.

The indexable table has grown far larger than your published content and doesn’t shrink. Usually orphaned rows left behind for users, posts, or terms later deleted — a deletion doesn’t clean up its row automatically. Yoast’s own engineering team documented this diagnostic pattern in a public GitHub issue:

SELECT * FROM wp_yoast_indexable AS i
LEFT JOIN wp_posts AS p ON i.object_id = p.ID
WHERE i.object_type = 'post' AND p.ID IS NULL;

Run that as a read-only SELECT first. Don’t hand-delete rows out of wp_yoast_indexable — they’re referenced by wp_yoast_indexable_hierarchy for breadcrumb relationships, and a manual DELETE can leave that table pointing at nothing. A full wp yoast index --reindex clears and rebuilds cleanly instead.

When this is the wrong approach

This page assumes routine drift — a bulk edit, a direct database change, an ordinary content-management mistake. If you’ve just completed a full site migration and the table is stale across the board rather than on a handful of posts, the batching, verification, and rollback considerations are different enough that Yoast indexable rebuild after a migration is the more complete procedure to follow.

If the sitemap returns an empty body or a server error rather than stale content, that’s a PHP fatal during generation, not indexable staleness, and no amount of reindexing fixes it — see the blank-sitemap guide linked in step 6. And if you’re not running Yoast SEO at all, none of the table names, filters, or WP-CLI commands here apply; Rank Math and AIOSEO use entirely different internal architectures for the same job.

Running WordPress that earns real money deserves an operator — Stack Harbor runs that stack under Enterprise WordPress; book an infrastructure consult.