Created
May 13, 2018 14:43
-
-
Save bmakowski/4c801c95a78920603a66b8c3e225e6c0 to your computer and use it in GitHub Desktop.
Wordpress SQL Delete Custom Post Types and Meta
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 | |
p,pm | |
from wp_posts p | |
join wp_postmeta pm on pm.post_id = p.id | |
where p.post_type = 'companies' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Replace 'companies' with custom post type slug.