Skip to content

Instantly share code, notes, and snippets.

@n8kowald
Last active November 2, 2017 01:18
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save n8kowald/462c88cc637116a6ec468b63b0d473dd to your computer and use it in GitHub Desktop.
Save n8kowald/462c88cc637116a6ec468b63b0d473dd to your computer and use it in GitHub Desktop.
Wordpress SQL queries
-- Delete all of posts of custom post type
DELETE FROM `wp_posts` WHERE `post_type` = 'post-type';
-- Delete all unpublished of custom post type
DELETE FROM `wp_posts` WHERE `post_status` = 'draft' and `post_type` = 'post-type';
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment