Tuesday, July 12, 2016

Change site collection URL in SharePoint 2013

How to change the site collection URL in SharePoint 2013? Suppose in your company, you have already created your site collection and customized everything but later, your company decides to change the Site URL. What will you do?

Open SharePoint Management Shell as Administrator

$site = Get-SPSite http://sharepoint/sites/marketing
$uri = New-Object System.Uri("http://sharepoint/sites/sales")
$site.Rename($uri)

Run IIS reset

You can only use this to rename site collection URL’s that
– Use “Wildcard inclusion” Managed Paths.
– Are Host named site collections (In which case you could also use Set-SPSiteURL)
You can’t use it to change http://sharepoint/sites/marketing to http://sharepoint/marketing (Even if the Explicit inclusion managed path exists).


No comments:

Post a Comment