Support » Fixing WordPress » Category slug problem

  • Resolved jennifer2010


    When I try to create a new category it forces the category slug to include a -2 after.

    So for example if I put “Shirts” as the name and “shirts” as the slug, after submitting the slug will be turned into “shirts-2” and the correlating permalink which messes up my urls.

    If I delete it and go to it’s a 404, so it’s not like I already have a page…

    Any ideas?

Viewing 3 replies - 1 through 3 (of 3 total)
  • Josh


    Moderator and Editor Customizer

    You probably already created a category with the slugname “shirts” at some point in the past. When you add a slug, it goes directly into the database. So, if you use the same name again, wordpress defaults to making sure it doesn’t have the same name by adding “-2” after it.

    The best way, if you HAVE to use this, would be to go into the database and remove the slugname from there.

    Yep, that worked! > phpmyadmin > select your wp database > search > enter slug > select all > open the one’s with matches and find the one where it has your old slug and delete (can’t remember what table it was in) > add category again – fixed. – that’s how I did it.

    Thanks for the help Josh!



    Moderator and Editor Customizer

    My pleasure. Glad you got it resolved!

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Category slug problem’ is closed to new replies.