640X60广告位招租 qq245909083

WordPress删除文章修订版本和自动保存的草稿

分享时间:2020-03-08 140 热度℃
删除所有文章的修订版:

DELETE a,b,c
FROM wp_posts a
LEFT JOIN wp_term_relationships b ON (a.ID = b.object_id)
LEFT JOIN wp_postmeta c ON (a.ID = c.post_id)
WHERE a.post_type = 'revision';
删除自动保存的草稿:

DELETE a,b,c
FROM wp_posts a
LEFT JOIN wp_term_relationships b ON (a.ID = b.object_id)
LEFT JOIN wp_postmeta c ON (a.ID = c.post_id)
WHERE a.post_status = 'auto-draft';
返回顶部