WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I just added a new category to my WordPress site, but the WP is adding a "-2" to the url as if there was an existing category with the same name. But there isn't. There was, but I deleted it. How can I resolve this?

I'm don't mind mucking around with the database in order to manually change the values (if necessary) but I would appreciate some guidance form somebody who knows what they are doing.

share|improve this question

Go into the trash from the category list and hit "Empty Trash".

As long as the category is in the trash, the slug is considered 'in use'.

ETA: This is obviously not right, as there's no trash in categories. Instead, using phpMyAdmin, go to database->wp_terms, and delete the row with the category information.

Walkthrough here.

share|improve this answer
Are you saying that the category section has an "empty trash" button? Because I'm not seeing anything like that. I know that the "posts" section has such a button. – Richard Jun 7 '12 at 22:52
Wait, you're right - there's no 'empty trash' for categories. I'm updating my post with some new info instead. – SickHippie Jun 7 '12 at 23:05
Thanks for the help. It worked. Although, I can't help but wonder why WP would leave behind these entries hidden in the database after I supposedly "delete" them. – Richard Jun 8 '12 at 0:59

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

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