Last active
August 16, 2021 05:46
-
-
Save manuelricci/106a4cb6ab29e73fb23beb85e949e6f1 to your computer and use it in GitHub Desktop.
Query to delete all the records of the events created with The Events Calendar
This file contains hidden or 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
/* | |
How to use it: | |
1 - Change the table prefix `wp_` if the one in the db is different | |
2 - Execute the query | |
3 - Done 🎉 | |
*/ | |
DELETE a,b,c,d | |
FROM wp_posts a | |
LEFT JOIN wp_term_relationships b ON ( a.ID = b.object_id ) | |
LEFT JOIN wp_postmeta c ON ( a.ID = c.post_id ) | |
LEFT JOIN wp_term_taxonomy d ON ( d.term_taxonomy_id = b.term_taxonomy_id ) | |
LEFT JOIN wp_terms e ON ( e.term_id = d.term_id ) | |
WHERE a.post_type = 'tribe_events'; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment