Is there a way to remove all posts from all categories? I found plugin for this, but it's very slow. What I need is MySql query that will help me remove all posts from all categories. If you know how to implement the same code, but only to specific category, that would be useful to have for reference too. So how to disassociate all post that belong to one category from all categories (therefore they will belong only to default 'uncategorized' category). Thanks a lot.

1 Answer 1


Have you tried just deleting all the categories in Posts > Categories? When you delete a category, it only deletes the category and NOT the posts. All the posts will then default to uncategorized.

  • 1
    And if afterwards you could recreate the category if you need it for something else.
    – janw
    Commented Sep 13, 2012 at 13:28
  • 1
    Thanks for suggestions guys. I did looked into that and notice it takes some time to delete categories. I have close to 300 and 20,000 posts in this database. Hence I want to move it and clean up. But I am noob with WP and was thinking that it would be good to learn some tricks, such as this mysql query... Still your suggestion stands as the best solution for now. If no there is no query or any other trick, I'll go for your solution in a few days. Thanks Bryce and Janw.
    – Dean
    Commented Sep 13, 2012 at 15:37

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.