Skip to content

Instantly share code, notes, and snippets.

@eon01
Created September 26, 2015 14:47
Show Gist options
  • Save eon01/4c7699807a4be35e846c to your computer and use it in GitHub Desktop.
Save eon01/4c7699807a4be35e846c to your computer and use it in GitHub Desktop.
Delete all woo commerce categories
DELETE FROM wp_term_relationships WHERE object_id IN (SELECT ID FROM wp_posts WHERE post_type = 'product');
DELETE FROM wp_postmeta WHERE post_id IN (SELECT ID FROM wp_posts WHERE post_type = 'product');
DELETE FROM wp_posts WHERE post_type = 'product';
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment