Orphaned post meta is metadata whose parent post no longer exists: rows in wp_postmeta pointing at deleted posts, revisions, or removed plugin content. They serve no purpose, but they sit in one of WordPress's largest tables and slow every meta query. The fix is to delete rows with no parent and the plugin leftovers around them.
What causes this?
Deleting a post does not always delete everything attached to it, especially when plugins added their own meta. Years of deleted products, cleaned revisions, and removed plugins leave a sediment of unreachable rows. wp\_postmeta is queried constantly, so its size matters.
How to check
Count the meta rows whose parent post is gone:
SELECT COUNT(\*) FROM wp\_postmeta pm
LEFT JOIN wp\_posts p ON p.ID = pm.post\_id
WHERE p.ID IS NULL;
That is the orphan count. Also worth counting duplicate meta keys per post on very old sites.
How to fix it manually
Back up the database first. This is a destructive delete.
- Back up
wp db export.
- Delete orphans
- Repeat the same pattern for orphaned term and comment meta
- Optimize tables
wp db optimize.
- Re-count to confirm zero
How BoltAudit does it
The audit runs all of the above for you and turns it into one reviewed action.
1Finds it automatically with the exact row count as evidence.
2Preview the exact change. How many rows across which meta tables.
3Automatic backup, then delete in one click.
4Roll back any time from the restore point.
Common questions
Can this delete meta I need?
Rows joined to no existing post are unreachable by WordPress. With the backup taken first, risk is effectively the restore point.
How does this happen on a normal site?
Deleting content, changing themes, and removing plugins over years. It is normal sediment, not a sign anything is wrong.
How much speed does it buy?
Small alone, meaningful combined with revisions cleanup and indexes on large sites. The audit estimates per site.
Will it come back?
Slowly, with normal content churn. A scheduled audit keeps the count near zero.
Run BoltAudit on your site
Free plugin · 1 site · 3 audits per month · no credit card.