Title: what circumstances add &#039;-2&#039; to a slug
Last modified: August 31, 2016

---

# what circumstances add '-2' to a slug

 *  [gulliver](https://wordpress.org/support/users/gulliver/)
 * (@gulliver)
 * [10 years, 2 months ago](https://wordpress.org/support/topic/2-2/)
 * In what circumstances does WP add ‘-2’ to a slug?
 * I’d expect it to do so with duplicate post-names, but it also seems to do it 
   with posts which begin with a number.
 * I can usually work around it by prefixing the number, but it’ll be nice to know
   more.

Viewing 7 replies - 1 through 7 (of 7 total)

 *  [esmi](https://wordpress.org/support/users/esmi/)
 * (@esmi)
 * [10 years, 2 months ago](https://wordpress.org/support/topic/2-2/#post-7299350)
 * It should only add the `-n` to a slug when there is an existing Post or Page 
   with the same title. Did you check the Trash for any such Posts/Pages?
 *  Thread Starter [gulliver](https://wordpress.org/support/users/gulliver/)
 * (@gulliver)
 * [10 years, 2 months ago](https://wordpress.org/support/topic/2-2/#post-7299370)
 * Thanks, Esmi.
 * In my original post I incorrectly used ‘posts’ rather than ‘pages’… it should
   have read ‘seems to do it with PAGES which begin with a number’.
 * A further search suggests it’s ok to have posts with a numeric slug, but not 
   pages – hence the appending of -2.
 *  [esmi](https://wordpress.org/support/users/esmi/)
 * (@esmi)
 * [10 years, 2 months ago](https://wordpress.org/support/topic/2-2/#post-7299373)
 * I can’t think of any obvious reason why there should be an issue with numerical
   Page names. Can you give a list of steps to duplicate this using the default 
   theme and no active plugins?
 *  Thread Starter [gulliver](https://wordpress.org/support/users/gulliver/)
 * (@gulliver)
 * [10 years, 2 months ago](https://wordpress.org/support/topic/2-2/#post-7299426)
 * [This link](http://wordpress.stackexchange.com/questions/481/can-i-use-a-number-for-a-post-page-slug)
   offers info.
 * 🙂
 *  [esmi](https://wordpress.org/support/users/esmi/)
 * (@esmi)
 * [10 years, 2 months ago](https://wordpress.org/support/topic/2-2/#post-7299432)
 * Nice catch! Looks like numeric page slugs have been pretty much [outlawed](https://core.trac.wordpress.org/ticket/11917).
   🙂
 *  Thread Starter [gulliver](https://wordpress.org/support/users/gulliver/)
 * (@gulliver)
 * [10 years, 2 months ago](https://wordpress.org/support/topic/2-2/#post-7299440)
 * Oh well, such is life.
 * I’m sufficiently grateful for what WP can do, to no longer get too-bothered about
   what it can’t.
 *  Thread Starter [gulliver](https://wordpress.org/support/users/gulliver/)
 * (@gulliver)
 * [10 years, 2 months ago](https://wordpress.org/support/topic/2-2/#post-7299544)
 * Quick update…
 * More reading suggests this isn’t an uncommon query, so for others who may stumble
   upon this later…
 * The [Allow Numeric Slugs](https://wordpress.org/plugins/allow-numeric-stubs/)
   plugin is designed to allow pages with numeric slugs – albeit at the cost of 
   pagination for pages.
 * From what I understand, the reason WP core code prevents such naming is to avoid
   rewrite and other issues where numeric slugs are confused with paginated pages
   and/or dates.
 * But I won’t pretend to understand just why it applies to pages and not posts 
   and custom posts.
 * Personally, I’ll continue to try to not require numeric slugs – or to unobtrusively
   preface them accordingly (Example: my test pages are now ‘/test/t1/’, ‘/test/
   t2/’, etc rather than my preferred ‘/test/1/’ format.)

Viewing 7 replies - 1 through 7 (of 7 total)

The topic ‘what circumstances add '-2' to a slug’ is closed to new replies.

 * In: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
 * 7 replies
 * 2 participants
 * Last reply from: [gulliver](https://wordpress.org/support/users/gulliver/)
 * Last activity: [10 years, 2 months ago](https://wordpress.org/support/topic/2-2/#post-7299544)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
