If you’ve created a post category in the past and deleted it, then went back to create it again, you’ve probably noticed the slug will be “mycategory-2″. How annoying. This post will tell you what entry to delete using phpMyAdmin or a similar web-based database editing program.
If you’re looking to delete an old WordPress category that is causing numbered slugs, you found the right place. Good thing that this is a pretty easy fix. It just requires that you have access to your database with a interface such as phpMyAdmin. Although this is easy, this is a very advanced change, and caution must be taken. I can’t be responsible if you click the wrong thing and it causes errors in your database. Just be cautious and double check all names and categories before deleting them.
Step 1. Login to your hosting backend. Usually something like GoDaddy Hosting Control Panel or cPanel.
Step 2. Login to your database editor using phpMyAdmin or similar interface depending on your host.
Step 3. Click the name of your database in the top left side to drop down the entires.
Step 4. Click the item wp_terms. You should see the page populate: term_id, name, slug, slug_group
Step 5. Click the Browse Tab
Step 6. Navigate to the problem slug that has been deleted and click the red X in that row. MAKE SURE IT IS CORRECT (You can damage your wordpress if not.)
Step 7. Close phpMyAdmin or your DB Editor.
Step 8. Return to WordPress and try and create the directory you were having problems with. You should have no problem.
Thats it. Told you it was easy, now you know how to delete an old duplicate category slug fron the WordPress Database.