Sometimes you will want to tidy the database, maybe from a development issue.
Removing orphaned post meta is simple in SQL
There are several posts about deleting Orphaned Post Meta Data in WordPress, some are dangerous, some are wrong, some have syntax errors.
This works
delete from wp_postmeta where post_id not in (select ID from wp_posts)
by
Tags:
Leave a Reply