If your generated URLs have “-2” appended to them (e.g., yourdomain.com/page-2
), it’s likely due to duplicate slugs being created during the page generation process. This happens when a slug already exists, and WordPress automatically appends “-2” to make the URL unique.
Why It Happens
You may have ignored a warning for duplicate slugs during the page creation process in LPagery. When two or more pages have the same slug, WordPress appends “-2” to the URL of the newer page to prevent conflicts.
How to Fix It
1. Delete the Pages with Duplicate Slugs
To resolve this, you need to delete the pages with duplicate slugs.
Follow this guide on how to delete pages to remove the incorrect pages.
2. Adjust the URL Slug
During the page creation process, make sure to adjust the URL slug to ensure it is unique for each page.
You can do this by using placeholders in the URL Slug field, such as
{service}
or{city}
, to generate unique URLs for each page.Read more here: Setting a Custom URL Slug
3. Recreate the Pages
Once you’ve deleted the duplicate pages and adjusted the slugs, regenerate the pages using LPagery. This will create the pages with the correct, unique URLs.