• Resolved namehidden

    (@namehidden)


    Hello. I have installed WordPress and found that the shop URL shows shop-2 instead of shop (for example: https://www.mywebsite.com/shop-2). I see this in the Settings – Permalinks. Attached the Settings – Permalinks (https://ibb.co/Kr1j5SX)

    I saved to use custom base (/shop/%product_cat%/). But it is not reflecting. How can I change it to shop?

Viewing 5 replies - 1 through 5 (of 5 total)
  • Arkaprabha Chowdhury

    (@arkaprabhachowdhury)

    Hey @namehidden, please check if in your pages if you have a page with the slug “shop” as this might conflict with the permalink. If found, please update it to some other slug or delete it. This page could be in the Trash too so please check that as well.

    Also, make sure to flush your permalinks by saving changes after changing the structure of the permalink.
    Hope it helps!

    Sahil Gidwani

    (@sahilgidwani)

    Hey,

    First, check if there’s already a page, post, or custom post type with the shop slug. WordPress adds -2 to a URL when the same slug is being used elsewhere. Head over to PagesAll Pages and look for any page named shop. Don’t forget to check the Trash section as well, since deleted pages can still hold onto the slug. If you find a shop page in the trash or live section, either rename it or delete it permanently.

    Once you’ve ensured no other page is using the shop slug, go to SettingsPermalinks and hit Save Changes without altering any settings. This will regenerate your permalinks and might fix the URL conflict.

    Hope this helps!

    Thread Starter namehidden

    (@namehidden)

    Thank you for your help, @sahilgidwani and @arkaprabhachowdhury,

    webpediapro

    (@webpediapro)

    Hi there! It looks like the issue is happening because there might already be a page, post, or custom post type with the slug “shop” that’s causing WordPress to add the “-2” to avoid duplication. Here’s how you can fix it:

    1. Check for Duplicate Pages:
      • Go to Pages in your WordPress dashboard.
      • Search for any page titled “Shop.” If you find one, either delete it or rename it (to something like “Old Shop”).
    2. Empty the Trash:
      • After deleting the duplicate page, make sure to empty the trash. WordPress holds deleted pages in the trash, which can still reserve the “shop” slug.
    3. Update the Permalinks:
      • After ensuring there’s no conflict with the “shop” slug, go to SettingsPermalinks again and save the settings without making changes. This should refresh your permalinks.
    4. Custom Base Issue:
      • If you’re using a custom base like /shop/%product_cat%/, ensure that no other page or category conflicts with this structure. You may need to clear the cache or re-save permalinks to ensure it takes effect.
Viewing 5 replies - 1 through 5 (of 5 total)
  • You must be logged in to reply to this topic.