Purging 40K+ Deleted Items From Database

Home Forums Calendar Products Events Calendar PRO Purging 40K+ Deleted Items From Database

Viewing 7 posts - 1 through 7 (of 7 total)
  • Author
    Posts
  • #1439949
    Greg
    Participant

    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!

    #1441883
    Brendan
    Keymaster

    Hey 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,
    Brendan

    #1441913
    Greg
    Participant

    Looks 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.

    #1442130
    Brendan
    Keymaster

    Hi 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,
    Brendan

    #1442186
    Greg
    Participant

    Well 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.

    #1442678
    Brendan
    Keymaster

    Thanks Gregory!

    #1462838
    Support Droid
    Keymaster

    Hey 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

Viewing 7 posts - 1 through 7 (of 7 total)
  • The topic ‘Purging 40K+ Deleted Items From Database’ is closed to new replies.