delete from wp_postmeta | |
where not exists (select 'x' from wp_posts where wp_posts.ID = wp_postmeta.post_id); | |
delete from wp_comments | |
where not exists (select 'x' from wp_posts where wp_posts.ID = wp_comments.comment_post_id); | |
delete from wp_commentmeta | |
where not exists (select 'x' from wp_comments where wp_comments.comment_id = wp_commentmeta.comment_id); | |
delete from wp_usermeta | |
where not exists (select 'x' from wp_users where wp_users.ID = wp_usermeta.user_id); | |
delete from wp_term_taxonomy | |
where not exists (select 'x' from wp_terms where wp_terms.term_id = wp_term_taxonomy.term_id); | |
delete from wp_term_relationships | |
where not exists (select 'x' from wp_term_taxonomy where wp_term_taxonomy.term_taxonomy_id = wp_term_relationships.term_taxonomy_id); |
ご利用は計画的に