I’m working on a site which has some incorrect permalinks contains ‘home-2’ e.g. http://example.com/home-2/pagetitle/. I have no way of knowing where home-2 came from and manually editing the permalink in the page editor only allows me to edit the pagetitle portion.

This question seems relevant but refers to the post title and not the portion of the URL I need to change.

So how might this home-2 situation have occurred. Perhaps a category or parent page? There are no posts or pages in the trash with that name. And how can I remove it without using a plugin such as this to reset the permalinks?

UPDATE

There is a wp_posts record in the database for the page with title ‘Home’ which has the post_name field set to ‘home-2’.

2 Answers
2

Simply visiting the permalinks page in wp-admin will reset the permalinks. On that page you also have options which permalinks you want. Check if the home-2/ bit is not prepended there.

Then ofcourse, the obvious is checking that the page ‘pagetitle’ is not a child of the page ‘home-2’. Check your trash for existing pages (but you’ve already done that).

Do all links have this home-2/ prepended? Or is it only the case on a few pages?

Tags:

Leave a Reply

Your email address will not be published. Required fields are marked *