Edit SQL to remove categories and reset numbering
-
After various experiments I want to remove all but the default category and reset the incremental numbering (so that a new category will be 2) – so I can’t just delete them from within WP.
As no posts are assigned to these categories, I’m wondering if I can simply delete the unwanted categories from the wp_terms table, and then reset the numbering with: ‘ALTER TABLE wp_posts AUTO_INCREMENT=2;’?
Or, alternately, to delete the unwanteds from within WP and then run the above SQL code?
I realise this is trivial and obsessive behavior – although I can happily live without such a fix, part of my reason for asking is to learn more.
The topic ‘Edit SQL to remove categories and reset numbering’ is closed to new replies.