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
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.
-
1And if afterwards you could recreate the category if you need it for something else.– janwCommented Sep 13, 2012 at 13:28
-
1Thanks 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.– DeanCommented Sep 13, 2012 at 15:37