Moving a Sharepoint Sub Site to its own Site Collection in 3 easy steps
March 28, 2012 1 Comment
Moving a Sharepoint Sub Site to its own Site Collection why should I do that? Well there might be a lot of reasons on doing this but for me its more handing over the Site collection Administration to the business which enables business owners to choose themes, manage security within the site collection, manage activated solutions and deploy other customizations. Another good reason for me is about Quota Management which I can’t do in a Sub Site model. How about you whats you reason?
So whatever your reason is I guess you either want to do it or thought of doing it that is why you are reading this article. So let’s get started and perform that 3 easy steps in moving your Sub Site in its own Site Collection.
On this demo we will be moving a Sub Site called “Sandbox” which is located in http://someURL/SomeTeamSite/sandbox
Step 1: Export your subsite by using the Export-SPWeb command.
You can do this on your Sharepoint Server and run the command using the SharePoint 2010 Management Shell. For this sample I had used the following command
Export-SPWeb -Identity "http://someURL/SomeTeamSite/sandbox/" -Path "C:\Exported Sub Site\SandboxSubsSite.cmp" -IncludeUserSecurity -IncludeVersions all
What that command does is basically export the sub site to a .cmp file where we included all Security Settings and Versions for more options check out Export-SPWeb on TechNet
You will notice once it exports you will have a log file showing you whats been done during the export process.
Step 2: Create you site collection. This is where you will host your new site.
Still on the Sharepoint Server (you can also do this remotely), go to “SharePoint 2010 Central Administration” then into “Application Management” then “Site Collections” then “Create a Site Collection”.
Indicate all of the properties needed
Take note you can also create managed paths, which means you can create a site at a specific path. To do that click on “Define Manage Paths” under the “Web Site Address”.
Step 3: Import your Content Migration Package (CMP) file that you exported using Import-SPWeb.
Still in the Sharepoint Server using the SharePoint 2010 Management Shell issue the Import-SPWeb command, for this sample it would be something like this
Import-SPWeb "http://someURL/sites/Sandbox" –Path "C:\Exported Sub Site\SandboxSubsSite.cmp"
Like Export-SPWeb the Import-SPWeb can have several parameters which you can see on TechNet
It will also create an Import log and once the import finishes your all good to go.
Now check your new site collection and compare to the sub site, and if your happy feel free to remove the subsite.