How to swap out an old sitefinity page for a new page

June 16, 2020

Sitefinity has the concept of workflows, pages can be in a draft state where changes can be made, then "published" to live. This lets people work on changes to pages without affecting what's being seen on Live.

However some people prefer to create entirely new pages and to delete the old pages.  This is certainly a valid scenario, it's just you might end up with broken links if you used the UI to link to a page you picked vs just pasting in the page url.

Here's the way you can swap in your new page as safely as possible.  These steps assume you have both pages already created.

  1. Old page - Give it a new Url: Edit title and properties on the old page. You need to change the url somehow maybe append -old or -retired to it.  So if it was about-us, make it about-us-old.  While we're here it's not gonna hurt to deselect show in sitemap, allow indexing\searching. Save changes.
  2. Old page - Remove multiple Urls: When you change a URL in sitefinity and save, the OLD url is persisted to the Multiple Urls field against that page.  This lets sitefinity auto-redirect from the previous url.  The problem is that it being here is going to prevent us giving it to another page!  So go in, delete it from the Multiple Urls field, and uncheck allow multiple urls. Save changes.
  3. New Page: Update Url: Edit the Title and Properties of the NEW page, and give it the old pages original url.  Because it's not being used anymore it should save fine.  Make sure to set any other properties like indexing\search\sitemap if you need them. Save changes.
  4. Old page: Unpublish: We don't need it anymore, get rid of it... unpublish, recyclebin whatever you need.  I prefer to unpublish so I have a chance to fix any bad links if they exist.

Here are some resources on how to make a tool to find old page links that you might need to address.

etc etc... gotta check all content types.

Note

Because of how complex this is with swapping things around and finding old bad pages, the preferred method (per Progress) is NOT use the sitefinity page picker if you plan on deleting lots of pages.  If you just paste in hardcoded urls, you can leverage the Multiple Urls fields easily to just redirect things around. If a page gets deleted your <a> link becomes like <a href="CANT FIND PAGE"> or something, vs using urls <a href="/about-us">. So about us might be deleted, but on Home you could add the multiple url of ~/about-us, and that old link would send the user to the homepage and not just be broken.



Image Description

Steve McNiven-Scott

Best\Only Blogger on this site. Therefore defacto blogger of the year Award Winner.