1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Delete all posts from a category?? Need to delete 16k posts

Discussion in 'Blogging' started by wannabie, Aug 29, 2011.

  1. wannabie

    wannabie Elite Member

    Joined:
    Mar 11, 2009
    Messages:
    3,807
    Likes Received:
    2,954
    Occupation:
    Seo and Marketing Suprisingly
    Location:
    Your bedroom window
    Home Page:
    Hi -

    I have tried plugins and all sorted and its driving me nuts, I need to delete 16k crap posts from a category on a wordpress blog, I thought I would simply delete the category only to find out it will simply move the posts to the next category!!

    I have tried the plugin bulk-delete, its the worst plugin I have eve used :)

    Your advice would be great
     
  2. ClThis

    ClThis Regular Member

    Joined:
    Oct 27, 2009
    Messages:
    392
    Likes Received:
    228
    Occupation:
    Merchant Services
    Location:
    USA
    What are the negative (positive) effects of deleting that many posts? Even if they are all crap isn't it still a bad thing?
     
  3. wannabie

    wannabie Elite Member

    Joined:
    Mar 11, 2009
    Messages:
    3,807
    Likes Received:
    2,954
    Occupation:
    Seo and Marketing Suprisingly
    Location:
    Your bedroom window
    Home Page:
    Not when its duplicated crap :0

    I would sooner 10 high quality posts other 10k crap ones any day, I dont mind deleting 16k in one go at all -

    I will jump up the serps as soon as I have removed them
     
  4. websitemarketingguru

    websitemarketingguru Newbie

    Joined:
    Mar 30, 2009
    Messages:
    12
    Likes Received:
    16
    Delete the user. That will give you the option to delete the posts associated with them.
     
    • Thanks Thanks x 1
  5. wannabie

    wannabie Elite Member

    Joined:
    Mar 11, 2009
    Messages:
    3,807
    Likes Received:
    2,954
    Occupation:
    Seo and Marketing Suprisingly
    Location:
    Your bedroom window
    Home Page:
    Its the admin :)
     
  6. Scripteen

    Scripteen Elite Member

    Joined:
    Sep 19, 2009
    Messages:
    1,811
    Likes Received:
    1,918
    Home Page:
    You can do that from phpmyadmin. You also need to delete related tags and comments.
     
  7. ClThis

    ClThis Regular Member

    Joined:
    Oct 27, 2009
    Messages:
    392
    Likes Received:
    228
    Occupation:
    Merchant Services
    Location:
    USA
    -> Login into the wordpress admin.
    -> Click on posts -> edit.
    -> Click on category for which you need to delete the posts.
    -> Select all the posts.
    -> Select delete from bulk actions drop down at the top which will delete the posts from the selected category.

    Also you can use this plugin:

    http://wordpress.org/extend/plugins/bulk-delete/

    OR

    DELETE command in MySQL.

    [WARNING: Back up your database before doing something as destructive as this]

    DELETE FROM wp_posts, wp_post2cat USING wp_posts, wp_post2cat WHERE wp_posts.ID=wp_post2cat.post_id AND wp_post2cat.category_id="CAT#";

    Replace CAT# with the numeric ID of the category. This removes the posts from the posts table, as well as the references to them under post2cat (the table that assigns categories to posts). If you are using a different table prefix than wp_, make sure to correct this in the query line above.

    OR

    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.


    ------


    I just Google'd it and have time....so don't hold me to it
     
  8. sukataetumba

    sukataetumba Senior Member

    Joined:
    May 25, 2010
    Messages:
    1,109
    Likes Received:
    213
    my favorite bulk post plugin - NukePiG

    it will nuke anything you want it to
     
    • Thanks Thanks x 1
  9. wannabie

    wannabie Elite Member

    Joined:
    Mar 11, 2009
    Messages:
    3,807
    Likes Received:
    2,954
    Occupation:
    Seo and Marketing Suprisingly
    Location:
    Your bedroom window
    Home Page:
    How many posts can it do?
     
  10. sukataetumba

    sukataetumba Senior Member

    Joined:
    May 25, 2010
    Messages:
    1,109
    Likes Received:
    213
    literally no limits. best of all it is free.
     
    • Thanks Thanks x 1
  11. ptchero

    ptchero Junior Member

    Joined:
    Nov 12, 2008
    Messages:
    110
    Likes Received:
    188
    Occupation:
    what is a job?
    Location:
    on a server somewhere
    try deleting the posts directly from the Mysql database