3

I have a site collection (of type enterprise KB) under the following URL http//servername/customer/questions where the customer is a wildcard managed path. now I want to change the site collection URL to be http://servername/customer/generalquestions.

so I am not sure how to change the site collection URL. I read that I can backup the current site collection, remove it,create a new site collection under the desired URL (customer/GeneralQuestion), restore the backup file on the new url.. but I am not sure if there is a more straightforward approach to follow? using power shell or UI to accomplish this ?

Thanks

2 Answers 2

3

First of all, there is no way to do this using the GUI, You have to rely on the PowerShell. there are 2 options in Powershell.

  • use the Copy-Spsite

    • Copy-SPSite http://contoso/sites/OldTeam -DestinationDatabase WSS_Content -TargetUrl http://contoso/sites/NewTeam
    • Now Run the Remove-Spsite to remove the old site.
  • Another option is Using the BackUp and Restore

    • use Backup-spsite to get the backup
    • Now run the restore-spsite to restore on New URL
    • Now Run Remove-Spsite to remove the old site.

At the end you have to run the Search crawl so that old content removed and new added.

10
  • i think i will go with the backup/restore since i use it to do a back up for the my site collections, while i did not use the Copy-SPsite before.. so which approach is better ? second question, i know that SP allow to restore a site collection under the same content DB , although i should not do this since i will end up having duplicate GUIDs inside the old CS and inside the new SC .. so my question if i need to remove the old CS before restoring it on the new URL ,, because you mentioned i can restore on new url then remove the old CS ..
    – John John
    Apr 18, 2016 at 12:43
  • 1
    Backup site collection is old traditional way to do. Yes you can delete the site collection before restore...Copy spsite is new commandi n SP2013, which will save u some time.
    – Waqas Sarwar MVP
    Apr 18, 2016 at 12:53
  • 1
    yes both are same, I tested both personally couple of times
    – Waqas Sarwar MVP
    Apr 18, 2016 at 12:57
  • 1
    I had 100% sucess in the backup and restore process
    – Waqas Sarwar MVP
    Apr 18, 2016 at 12:59
  • 2
    $Site.rename...Basically for changing from Path-based site collection ot HSNC. MSFT never advertise from path based to Path-based url rename.
    – Waqas Sarwar MVP
    Apr 18, 2016 at 13:09
7

Source: http://www.sharepointrelated.com/2015/03/30/change-site-collection-url-sharepoint/

$site = Get-SPSite http://servername/customer/questions
$site.Rename("http://servername/customer/generalquestions")

And you have more detailed info in http://www.toddklindt.com/blog/Lists/Posts/Post.aspx?ID=573

7
  • so what is the differences between using $site.Rename and using backup/restore ?
    – John John
    Apr 18, 2016 at 12:46
  • I think is easier. I did not test it. Anyway, I recommend you do a test in a QA environment. Apr 18, 2016 at 12:48
  • 2
    What's the point in doing a backup and restoring it if you are just changing the URL? I can't see any disadvantages with this approch as it does exactly what you need. Apr 18, 2016 at 12:59
  • 1
    Did you see the unexpected error here toddklindt.com/blog/Lists/Posts/Post.aspx?ID=573 ? Apr 18, 2016 at 13:14
  • 1
    It is difficult to recommend. If you feel safe with backup and restore, go ahead. I would prefer to try the method rename. But I understand you. Apr 18, 2016 at 13:55

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.