I've been learning about taxonomies, custom posts etc though a lot of trial and error. I finally have it working how I want, however now I am getting some conflict with my desired slugs. I can't name my category "venue" because someplace in the database, that's already taken (I assume) - even though I've deleted the category that used it. Now when I try adding the category that I want to use the "venue" slug, WP automatically makes it "venue-2", which I definitely don't want in my url as the folder. Any suggestions for this?

  • Any progress on this question?
    – kaiser
    Commented Oct 13, 2012 at 15:50
  • @kaiser, I'd love to know how to change that as well. I'd rather avoid messing with the database itself. Commented Oct 27, 2013 at 22:26
  • 1
    Clear your trash posts, pages etc. deleting items permanently. Commented Feb 12, 2015 at 14:53
  • @MayeenulIslam That should actually be an answer - or search up an answer that you can take and mark this one as duplicate. Thanks.
    – kaiser
    Commented Feb 18, 2015 at 0:36

4 Answers 4


This can also be caused by uploading images with the same file name as the post/page. In my case, I uploaded an image called 'careers.jpg' before I created a page called 'Careers', so the page was getting the '-2' appended. To fix it, I just changed the slug on the image, then I was able to change the slug on the page.


The slug is stored in the post_name column of your posts table. I'd recommend searching that table first before manually assigning that slug, though.

  • thank you! this is exactly the information I needed. It's not letting me manually assign the slug, which is a failsafe I guess.
    – jamie
    Commented Sep 11, 2012 at 23:53
  • What are you using? You can do this with PHPMyAdmin; I have in the past. Commented Sep 11, 2012 at 23:56
  • @Joseph, how about custom post type taxonomy slugs? I don't even have any CPT posts left yet taxonomy keeps adding numbers to slugs... Commented Oct 27, 2013 at 22:28
  • Do a complete search of your database for the slug that you are trying to use. Commented Oct 28, 2013 at 14:21
  • Thank you. still valuable advice in 2019
    – NAMS
    Commented Jan 16, 2019 at 20:08

Usually when Wordpress appends the "-2" to a slug, that means you still have the old content, that you meant to delete, in the trash. Be sure to empty your wordpress trash, then try making the slug.

To access the pages in the trash, open the Pages / All pages menu, then click on the "Bin" section that appears on the right hand side of the "All" section. Note that if there is no items in the bin, this section will not appear.

  • Is there a trash for slugs somewhere then? :) Commented Oct 27, 2013 at 22:25

There is another cause for Wordpress appending -2 at the end: When the slug only contains numbers. This is not allowed.

Example: I wanted to name my page 2016 and even though there has never been a 2016 in the database the slug always turned into 2016-2. As far as I remember this is because numbers have a special meaning for workpress (path variables) and they couldn't be distinguished.

So my solution was to manually rename the slug to year-2016 which looks nicer than this "-2" suffix.

  • great found, thanks
    – fdrv
    Commented Sep 14, 2022 at 18:25

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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