WordPress.org

Ready to get started?Download WordPress

Forums

[resolved] Delete all posts from a category (4 posts)

  1. polle001
    Member
    Posted 3 years ago #

    Hi, how can I delete 3800 posts from a single category at once ?

    Thanks.

  2. You should check out the bulk delete plugin.
    http://wordpress.org/extend/plugins/bulk-delete/

  3. polle001
    Member
    Posted 3 years ago #

    Thanks, but not for 3800 posts, it only hangs each time.

    If someone else needs something like this use this query in your database.

    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 e.term_id =36

    Change 36 to you category ID number.

  4. Oooo thanks for sharing that mysql query that's a good one to know.

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags