• [ Moved to Fixing WordPress ]

    I recently noticed that when I update posts, wordpress is automatically adding a “-2” or “-3” to the permalink of the post. For example, I just updated this post that I published back in January:

    https://realsimplegood.com/crockpot-chicken-enchilada-soup/

    When I updated the post it automatically updated the permalink to add a “-2”:

    https://realsimplegood.com/crockpot-chicken-enchilada-soup-2/

    I have checked in the trash and deleted all post revisions. However, when I try to manually update the permalink to remove the “-2” it keeps adding it back in. Now, when I type in the old URL it redirects to the new “-2” URL automatically.

    This is just one example but it is happening on multiple posts. I’m losing all of my built up SEO on these posts – please help!

    Website: realsimplegood.com

Viewing 6 replies - 1 through 6 (of 6 total)
  • Hi!

    I checked out your website and the second picture, that you have of the soup, is named:
    https://realsimplegood.com/wp-content/uploads/2016/12/Crockpot-chicken-enchilada-soup.jpg

    I think that this is why your permalink is changing.

    Try naming the image something different and I bet you it will allow you to finally change the permalink.

    I found a similar problem here:
    https://wordpress.stackexchange.com/questions/174464/stop-wordpress-appending-2-to-the-end-of-my-url-after-i-change-it

    Try this and let me know how it works!

    ~Josh

    Thread Starter justinwinn

    (@justinwinn)

    Josh,

    Thank you! Changing the name of the image worked.

    This is weird because in a lot of my posts I have an image with the same name as the post title and this wasn’t an issue. Maybe there was a change in how this was handled in the latest update of wordpress?

    Anyway, thanks for the help and I know what the issue is now and can fix it if it comes up again.

    Justin

    Thread Starter justinwinn

    (@justinwinn)

    So that resolved the issue on the specific post noted above but I’m having a similar issue that doesn’t seem to be image related.

    To give you a little background, we have recipes on our site that are only for our paying meal plan subscribers. When we title these recipes, we always add a (MP) the title, like this:

    Title: Green Sauce (MP) URL: https://realsimplegood.com/green-sauce-mp/

    Sometimes we want to post the same recipe on our general blog for everyone. For this, we would just title it the name of the recipe without the (MP), like this:

    Title: Green Sauce URL: https://realsimplegood.com/green-sauce/

    For some reason, when I try to create a post titled simply Green Sauce, it’s adding a “-2” to the permalink. I published the post so you can see it.

    https://realsimplegood.com/green-sauce-2/

    Is there a specific reason this is happening? I’ve deleted all post revisions and drafts, but obviously wordpress thinks that I have a post titled green sauce somewhere. We also don’t have any images named green sauce anywhere.

    I can’t figure out why this is happening because the other post has a -mp added at the end which should make it unique.

    Thanks for your help.

    Justin

    Hi again, Justin!

    That is a very interesting twist to the problem.

    I wonder if it’s an issue with the database…

    Maybe you could try a new naming system with you Images and you Meal Plans. Like adding “Image” or “MP” to the beginning of the name.

    For Example:
    https://realsimplegood.com/mp-green-sauce/
    or
    https://realsimplegood.com/wp-content/uploads/2016/12/img-Crockpot-chicken-enchilada-soup.jpg

    I bet your database will like it more.

    Could you give it a try and let me know how it works?

    Best of Luck and I hope this Helps!

    ~Josh

    Thread Starter justinwinn

    (@justinwinn)

    Josh,

    The new naming system doesn’t work. I tried adding a MP at the front as well as Meal Plan all spelled out.

    https://realsimplegood.com/mp-green-sauce/
    https://realsimplegood.com/meal-plan-green-sauce/

    Either way when I draft another post just named “Green Sauce” it adds the “-2” to the end.

    It’s as if instead of comparing for an exact name match in the database, it’s matching the phrase “green sauce” and automatically adding the “-2”.

    The funny thing is, I have been posting a lot of recipes like this and it has worked in the past, I just noticed the issue recently.

    For example I have these two URL’s:

    https://realsimplegood.com/mushroom-spinach-and-bacon-egg-muffins-mp/
    https://realsimplegood.com/mushroom-spinach-and-bacon-egg-muffins/

    If I go to edit the second URL (the non -mp URL), it updates just fine and doesn’t add the “-2” to the permalink.

    Any additional ideas?

    Thanks again,

    Justin

    • This reply was modified 7 years, 11 months ago by justinwinn.

    Hey Again, Justin!

    That is frustrating.
    There must be something else in your database named “Green Sauce”.
    It could be another picture with that name that you have on a different post or anything else.
    I saw a bunch of post come up when I searched “Green Sauce” on your site.

    You could do a search for the slug in your database. If you really want to find it.
    Here is an example with a video of how to use phpMyAdmin to search a database on Host Gator.
    https://support.hostgator.com/articles/searching-through-a-mysql-database-in-phpmyadmin

    If you are not interested in getting in that deep…
    You could just search through your media files and if that does not turn up anything then you could consider renaming the sauce. ??

    I hope that my assistance was helpful! Good Luck!

    ~Josh

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘WordPress adding number to permalink when I update a post’ is closed to new replies.