WordPress清理无用自定义字段

# show the orphan postmeta
SELECT * FROM tableprefix_postmeta pm LEFT JOIN tableprefix_posts wp ON wp.ID = pm.post_id WHERE wp.ID IS NULL;
# remove the orphan postmeta
DELETE pm FROM tableprefix_postmeta pm LEFT JOIN tableprefix_posts wp ON wp.ID = pm.post_id WHERE wp.ID IS NULL;

发表评论

此站点使用Akismet来减少垃圾评论。了解我们如何处理您的评论数据