I’ve been using WordPress for this blog for the last several years. Lately, I noticed a problem: every new post I add appears in the “Uncategorized” post category, and it is impossible to remove a post from a category.
I’m sure the good folks at WordPress will fix this problem soon, but until then, here are the SQL statements I need to remove all posts from the “Uncategorized” category:
DELETE vttoth_term_relationships FROM vttoth_term_relationships, vttoth_posts WHERE term_taxonomy_id=1 AND object_id=ID AND post_type='post'; UPDATE vttoth_term_taxonomy SET count=0 WHERE term_taxonomy_id=1;
My WordPress database is called ‘vttoth’; for a WordPress database that uses a different name, the above instructions must be altered accordingly.