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 have a custom content type, 'Events'. I'm unable to rename the slug of one event from '2010-2' to '2010'. There are 6 or 7 other entries of the same content type and they're all fine.

Here's what I've done:

  • Verified no items in the Trash (for every content type, just to be sure)
  • Manually removed drafts, autosaves and revisions from the database
  • Verified that no other existing piece of content has 2010 in its slug

EDIT Worth noting that "/events/2010" actually redirects to "/events/2010-2"

share|improve this question
Why can't you just manually rename it? When editing the post, you should be able to click "edit" in the permalink field and edit it. You're not able to do that? – Androliyah Aug 2 '12 at 3:01
I had this problem once and wound up forcing the slug to be set as the one I wanted on save using a db query. Unfortunately I do not have the code in front of me right now. I would not recommend it anyway as it is a dirty hack. – Joseph Leedy Aug 2 '12 at 3:02
did you check thoroughly the table wp_posts? the attachments also have slugs. also check post_content and guid columns, might have something using "2010" – peteroak Aug 2 '12 at 3:05
@Aliyah Sure I can do that, but it renames it right back to '2010-2' as if there were a duplicate. – Mike Aug 2 '12 at 3:05
For sure you have missed something. Your site will only add -2 if there is an original somewhere. Try making sure everything is gone and permanently deleted again – Androliyah Aug 2 '12 at 3:07

Items left in your trash will directly affect new permalinks being appended with -$N.

share|improve this answer
Verified no items in the Trash he said he did. – peteroak Aug 2 '12 at 3:42
I know he said he did, I read that. But humans often err. :-) – Androliyah Aug 2 '12 at 8:13
This does not provide an answer to the question. To critique or request clarification from an author, leave a comment below their post. – Brian Fegter Aug 29 '12 at 1:30
@BrianFegter The author thinks that posts in the trash do affect the permalink generation. I don't know if this happens, but I leave it as "Looks good" during review. – kaiser Aug 30 '12 at 12:45
@kaiser You're right. Edited and upvoted this answer. – Brian Fegter Aug 30 '12 at 12:52

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.