Skip to content

Instantly share code, notes, and snippets.

@bmakowski
Created May 13, 2018 14:43
Show Gist options
  • Save bmakowski/4c801c95a78920603a66b8c3e225e6c0 to your computer and use it in GitHub Desktop.
Save bmakowski/4c801c95a78920603a66b8c3e225e6c0 to your computer and use it in GitHub Desktop.
Wordpress SQL Delete Custom Post Types and Meta
delete
p,pm
from wp_posts p
join wp_postmeta pm on pm.post_id = p.id
where p.post_type = 'companies'
@bmakowski
Copy link
Author

Replace 'companies' with custom post type slug.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment