• Resolved GarrettB

    (@garrettb)


    Hi
    I am having a problem with my WordPress site!
    My permalinks are set to Post name.
    I have a page called “bands”, so its URL is mysite.com/bands
    I then have several pages whose Parent Page is “bands”
    I would expect their Page URLS to be something like:

    mysite.com/bands/page1
    mysite.com/bands/page2
    mysite.com/bands/page3

    But their Page URTL are

    mysite.com/bands/bands_trashed-2/page1
    mysite.com/bands/bands_trashed-2/page2
    mysite.com/bands/bands_trashed-2/page3

    It turns out that I had saved a template page, which I have been using for a while when creating a new page, and the template page’s URL is:
    mysite.com/bands/bands_trashed-2/my-template
    So I made some original mistake here ?
    Now, I can go ahead and re-create a new page template for any subsequent pages

    My question: But is there a way to change the page URL for the existing (20 or 30) pages?

Viewing 2 replies - 1 through 2 (of 2 total)
  • Mario Santos

    (@santosguillamot)

    Hi @garrettb !

    I don’t know if there is a better way, but if you “only” have 20 or 30 pages, maybe you can update them using the Bulk Edit action in the Pages in WP Admin.

    The way I would proceed would be something similar to this:

    0. Before proceeding, I would remove the old “bands” page from the trash to avoid confusion.

    1. Go to https://www.yoursite.com/wp-admin/edit.php?post_type=page&parentId=10. Make sure that you use your site URL and change the parentID for the ID of your “bands” page. If you don’t know how to get your page ID, you can follow this guide. You could even use a plugin like Parent Page Filter as well. Which will provide an interface instead of modifying the URL.

    2. Once you have filtered all the pages you want to modify, you can check them all with the checkbox at the top-left corner. Next to “Title”.

    3. Once all of them are selected, select Edit in the “Bulk actions” dropdown and click on Apply.

    4. It will open another menu where you can modify the Parent property to “bands” in bulk.

    I would recommend doing a backup of your site before proceeding. Maybe you can also try with a couple of pages first to ensure it is working as expected, and, once you feel confident, do it for the rest.

    Hope it helps, and you can solve it!

    Thread Starter GarrettB

    (@garrettb)

    Thanks Mario – I got it sorted in the end.
    I looked at each page, and I could see, on the right, where I would normally view/edit the page attributes, categories etc., that under page attributes, the Parent Page was set to bands.
    However, once I set the parent page to something else, and then back to bands and then saved/published the page, I got the desired result.
    The reason? I must have had an older “bands” page, and all my pages had set their parent to this. Once I forced a new relationship to the actual bands page I had, it knw what to do.
    IN the end, software etc., only does what we tell it to do.
    I was telling it to do the wrong thing ??

    Garrett

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Modifying page URLs’ is closed to new replies.