Home › Forums › Calendar Products › Events Calendar PRO › Purging 40K+ Deleted Items From Database
- This topic has 7 replies, 2 voices, and was last updated 6 years, 2 months ago by Greg.
-
AuthorPosts
-
January 30, 2018 at 10:50 am #1439949GregParticipant
We somehow ended up with over 40K+ items in our trash for events…I need one of two things:
1) The trash will not empty because it is so big…so is there a way to do that from the database directly?
2) If not, I’m glad to simply reset the entire operation and purge everything TEC related and start over…how would one do that?
Thanks for your help!
February 1, 2018 at 10:05 am #1441883BrendanKeymasterHey Gregory,
Oh man, that’s a lot of items!
There’s nothing in the plugin itself that will do a mass cleanup of that, but I have had luck using the Bulk Delete plugin. It allows you to select a specific post type (in this case tribe_events) and add parameters for which posts to remove. Extremely flexible!
Will this work for you as well? Please let me know. ?
Cheers,
BrendanFebruary 1, 2018 at 10:40 am #1441913GregParticipantLooks like that can do it, however, requires a $15 addon to get the stuff from the trash. Any other options that wouldn’t require a $15 purchase? I’m looking at this as a one time dealio.
February 1, 2018 at 3:39 pm #1442130BrendanKeymasterHi Gregory,
Well that stinks. Didn’t realize they started charging. I will let our team know. In regards to a different, I do not know of any. Maybe search for one in the wordpress plugin directory and see if any fit your needs.
Thanks,
BrendanFebruary 1, 2018 at 6:14 pm #1442186GregParticipantWell let me add the solution here in case anyone needs it and comes across this thread.
Caveat, make a back-up of your database. Just do it, don’t be silly.
All you need to do is run a SQL command
DELETE wp_posts,wp_term_relationships,wp_postmeta,wp_term_taxonomy
FROM wp_posts
LEFT JOIN wp_term_relationships ON ( wp_posts.ID = wp_term_relationships.object_id )
LEFT JOIN wp_postmeta ON ( wp_posts.ID = wp_postmeta.post_id )
LEFT JOIN wp_term_taxonomy ON ( wp_term_taxonomy.term_taxonomy_id = wp_term_relationships.term_taxonomy_id )
WHERE wp_posts.post_status='trash';Just like that, over 44,000 trashed posts gone.
February 2, 2018 at 9:27 am #1442678BrendanKeymasterThanks Gregory!
February 24, 2018 at 8:35 am #1462838Support DroidKeymasterHey there! This thread has been pretty quiet for the last three weeks, so we’re going to go ahead and close it to avoid confusion with other topics. If you’re still looking for help with this, please do open a new thread, reference this one and we’d be more than happy to continue the conversation over there.
Thanks so much!
The Events Calendar Support Team -
AuthorPosts
- The topic ‘Purging 40K+ Deleted Items From Database’ is closed to new replies.