With PowerShell, you will be able to move a Site Collection to be a subsite of another Site and this task is very simple.
- Export the Site Collection
- Create the New Subsite
- Import the Exported Site Collection
- Delete the Old Site Collection
We have a Site Collection at /sites/MoveMe with a subsite under it at /sites/MoveMe/MoveMe2. We want to relocate this Site Collection under an existing Site Collection at /sites/NewHome.
Follow the steps below to move the site. All of the actions are performed using the SharePoint 2010 Management Shell.
Export the Site Collection
Execute the following command, substituting in the proper Identity parameter for your environment:
Export-SPWeb -Identity https://portal.contoso.com/sites/MoveMe -Path "C:\MoveMe.bak" -IncludeUserSecurity -Compression 1024 -IncludeVersions 4
Note the additional parameters of IncludeUserSecurity, Compression, and IncludeVersions. IncludeUserSecurity is pretty self-explanatory, but Compression will make sure to limit the number of multiple backup files for larger Site Collections, while IncludeVersions 4 says to include all versions for files.
Create a New Subsite
The import command requires that a site exist prior to importing. Therefore, we need to make an empty subsite for our soon-to-be relocated site:
New-SPWeb -URL https://portal.contoso.com/sites/NewHome/MoveMe
Import the Exported Site Collection
Now that we have our exported Site Collection and our empty subsite, we can run the import command to relocate our site:
Import-SPWeb -Identity https://portal.contoso.com/sites/NewHome/MoveMe -Path "C:\MoveMe.bak" -IncludeUserSecurity
Once completed, we can navigate to /sites/NewHome/MoveMe and see that the site now exists in the new location as a subsite. If we navigate to MoveMe2 and use the folder icon, we can confirm that it is now a subsite under MoveMe, which is now a subsite under NewHome:
Delete the Old Site Collection
To clean everything up, we need to delete the old site collection. We perform this step last just in case we experience issues with the middle steps and need to start over:
Remove-SPSite -Identity https://portal.contoso.com/sites/MoveMe
(then Y to Confirm, or include the -Confirm parameter to auto-confirm)