Created
November 14, 2014 02:54
-
-
Save wokamoto/13535867e1e7d5332c7d to your computer and use it in GitHub Desktop.
[WordPress] pending の記事を全削除する SQL
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
delete from wp_posts where post_type = 'post' and post_status = 'pending'; | |
delete from wp_postmeta where not exists (select 'x' from wp_posts where wp_posts.ID = wp_postmeta.post_id); | |
delete from wp_term_relationships where not exists (select 'x' from wp_posts where wp_posts.ID = wp_term_relationships.object_id); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment