Click here to Skip to main content
13,195,841 members (52,876 online)
Click here to Skip to main content
Add your own
alternative version

Tagged as


2 bookmarked
Posted 29 Mar 2012

Moving a Sharepoint Sub Site to its own Site Collection in 3 easy steps

, 29 Mar 2012
Rate this:
Please Sign up or sign in to vote.
Three easy steps in moving your Sub Site in its own Site Collection.

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 what's 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”.

Once everything is set up properly you will receive a confirmation that your site collection was created.

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.


This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)


About the Author

Raymund Macaalay
Technical Lead
New Zealand New Zealand

You may also be interested in...


Comments and Discussions

GeneralMy vote of 5 Pin
Ryan S White8-Apr-15 11:19
professionalRyan S White8-Apr-15 11:19 
SuggestionPromote Subsite to Site Collection Pin
Member 1062458825-Feb-14 5:16
memberMember 1062458825-Feb-14 5:16 
QuestionThis's a good solution. Pin
Member 294094918-Apr-13 11:19
memberMember 294094918-Apr-13 11:19 
QuestionTried and Failed Pin
SP Joe22-May-12 10:02
memberSP Joe22-May-12 10:02 
QuestionNice Job Pin
Robert P. Howard3-Apr-12 13:06
memberRobert P. Howard3-Apr-12 13:06 
AnswerRe: Nice Job Pin
Raymund Macaalay3-Apr-12 13:44
memberRaymund Macaalay3-Apr-12 13:44 
On step 2 I am more confident on using the UI but that does not stop someone in using Powershell scripts.

And on your second statement is that a question or is that what happened to your trial? On my experience everything was imported even associations between the list inside the sub site
GeneralRe: Nice Job Pin
Robert P. Howard3-Apr-12 15:07
memberRobert P. Howard3-Apr-12 15:07 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.

Permalink | Advertise | Privacy | Terms of Use | Mobile
Web01 | 2.8.171019.1 | Last Updated 29 Mar 2012
Article Copyright 2012 by Raymund Macaalay
Everything else Copyright © CodeProject, 1999-2017
Layout: fixed | fluid