Can't Edit URL Slug

  • Unknown's avatar

    I’ve run into a problem on my website where I’ve created a page, but it’s adding a “-2” to the end of the url, and I cannot edit that off.

    The url in question is https://ddavidd.com/ebooks-2/

    Obviously I have created a page previously using “Ebooks” as the title and that I previously had it as ddavidd.com/ebooks/, but I deleted and trashed that page recently when I cleaned out my website, and now I’ve started rebuilding.

    I’m aware that wordpress does a “cache” of some sort where it retains url slugs for pages and posts, and when you try to recreate them, it adds the additional thing to the end… it does the same thing with image files.

    If I’m not mistaken, I think this can be fixed with a plugin that allows you to remove prior url slugs and file names so that this can be fixed with new pages, posts, or files. Does anyone have an idea of what plugin I would need to look for in order to do this? Yes I’m aware that I will have to upgrade my package to one that allows plugins. Also if this can be fixed without a plugin, please let me know. Thank you.

    The blog I need help with is: (visible only to logged in users)

  • Unknown's avatar

    In case I didn’t make any sense above, I want to change https://ddavidd.com/ebooks-2/ to https://ddavidd.com/ebooks/

  • Unknown's avatar

    but I deleted and trashed that page recently

    Hi David. When I go to https://ddavidd.com/ebooks/ I see this (temp screenshot)

    Where you able to resolve this?

  • Unknown's avatar

    Hi David. When I go to https://ddavidd.com/ebooks/ I see this (temp screenshot)

    Where you able to resolve this?

    I should clarify what I meant by “but I deleted and trashed that page recently”.

    A short time ago I went through my website and deleted a bunch of pages and posts so that I could relaunch the website with a new template. I wasn’t aware beforehand that I could have just changed the template without deleting some content. So now that I have the new template up, and as I’m starting to add pages back, I have this issue going on as mentioned in my initial post on this topic.

    I have not been able to resolve this. What you saw in your screenshot, and what I’m seeing on my end at https://ddavidd.com/ebooks/ has me a little confused on what is going on. That url is bringing up an image with the file name ebooks.jpg which is an image I created with that file name to serve as the featured image for that page which currently has the url https://ddavidd.com/ebooks-2/ which is what I want to change to https://ddavidd.com/ebooks/

    If I click on “edit” while looking at https://ddavidd.com/ebooks/ I am taken to a edit media page. It’s not the image I want to edit. I want to change the url slug that is currently https://ddavidd.com/ebooks-2/ to https://ddavidd.com/ebooks/ but I’m not able to do that because I already had a prior page titled “Ebooks” at the https://ddavidd.com/ebooks/ url. I hope this helps to make a better explanation of this issue.

  • Unknown's avatar

    UPDATE – Since my last reply, I changed the file name for the image ebooks.jpg to page_ebooks.jpg and uploaded that to be used as the featured image, then I deleted the original ebooks.jpg file out of my media files. Now if you try to go to https://ddavidd.com/ebooks/ you will be redirected to https://ddavidd.com/ebooks-2/

    Now I just need to figure out how I can change the url slug for https://ddavidd.com/ebooks-2/ to https://ddavidd.com/ebooks/ that I had before I deleted the original page with that url.

  • Unknown's avatar

    Hi again, then I’m not sure what is going on either; I’d expect a different URL if it was an image attachment page.

    The only way I know of to create a new page with the same URL as a page that you previously Trashed is to first permanently delete the original page from the Trash folder. https://wordpress.com/support/trash/#permanently-deleting-a-post-or-page

    Also noting that if you currently have any paid upgrade on your WordPress.com site, you are eligible for direct support when you use the support contact form at https://wordpress.com/help/contact

    Regardless, I’ve flagged this thread for Staff attention and assistance since they can see what is going on on the back end of your site. Thanks for your patience.

  • Unknown's avatar

    Looks like we were posting at the same time.

    Give my suggestion a try and let me know how that goes. If you still need help with this you can add the MODLOOK tag to the Tags Section of your forum post sidebar or post directly to Support through the contact form.

  • Unknown's avatar

    UPDATE – Ok since I changed the name of the featured image from ebooks.jpg to page_ebooks.jpg and deleted the original ebooks.jpg file from my media files, I was actually able to change the url slug to what I wanted. So I now have my page set to the https://ddavidd.com/ebooks/ that I was wanting.

    Reading some information I found at this page – https://wordpress.stackexchange.com/questions/174464/stop-wordpress-appending-2-to-the-end-of-my-url-after-i-change-it

    I discovered there, that apparently wordpress gives image files a url based off of it’s file name. So since I had titled that image as ebooks.jpg, and also I had uploaded that image with that file name before creating my new page, it was taking up the https://ddavidd.com/ebooks/ url that I wanted for the page.

    So my lesson learned here, and maybe this may help someone in the future who may search this forum, is to not title my images as the exact title that I want for a page.

    As far as I can tell now, this issue is resolved.

    Thanks!

  • Unknown's avatar

    You did all the work, so thanks for reporting back and letting us know you resolved this. :)

  • The topic ‘Can't Edit URL Slug’ is closed to new replies.