• Resolved timiambeing

    (@timiambeing)


    I know this has been asked millions of times but still there is no answer, I have no other pages in trash or anywhere, yet it still WP won’t let me change the slug and insists on putting “-2” after the name – there has to be a way to override the crazy behaviour as hundreds of posts seem to be here on the same lines?!!

Viewing 6 replies - 1 through 6 (of 6 total)
  • WordPress won’t allow a permalink with just numbers, so it adds -2 automatically.

    Is that the case with the permalink you’re having the problem with?

    Thread Starter timiambeing

    (@timiambeing)

    Hi Matt – yes I’ve seen that explanation a number of times thanks, but mine is simply the word Monthly that WP insists on renaming Monthly-2! Looks crap if anyone looks in the address bar and very unprofessional! I have nothing in the trash, but I notice that I do have ‘posts’ with that name – I haven’t created any posts but if I go to my development address and type the base url followed by /monthly I am taken to a JPEG with that name?!

    Hi timiambeing.,

    once you have page with “test” slug, You could not add a page with this same slue. If you need same (“test”) slug you need to delete permanently in trash page.

    Thread Starter timiambeing

    (@timiambeing)

    Ok – for all those who go searching for this problem and never ever find an answer (as I have done countless times over the last month or so!) here is my answer and it worked for me!

    I had an image uploaded with exactly the same name as the page I was having problems with. My image was called monthly.jpeg and my page was called monthly. WP wouldn’t allow this and if you have this problem and type in your base url followed by the name you want to use but can’t because WP puts a ‘-2’ on the end of it – i.e. ‘www.testwebsite.co.uk/nameofpage’ – you will see what WP thinks is the page and that will tell you why it won’t let you rename your page to that name.

    In my case it was what WP calls a ‘post’ but which is actually an ‘attachment’ page automatically created when you upload an image. Now, I also have images called ‘yearly’ and ‘quarterly’ and they don’t upset the pages with those names at all so it might have been caused when I switched back to ‘default’ permalinks and then back to ‘name of post’ again? Who knows – but deleting the image (it wasn’t used any more anyway) obviously deleted the attachment page and sorted the problem!

    Hope this helps anyone out there with this recurring and really frustration problem ??

    timiambeing: Your solution/observation was exactly right. Odd how WP can’t differentiate between a physical file and a permalink.

    How hard could it be to test for a file extension?

    Unbelievable.

    This just happened to me as well. I can’t it’s setup like this…

    THANK YOU for pointing this out!

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘Cannot rename slug as it keeps putting -2 after name’ is closed to new replies.