Convert a Sub-Site into a Site Collection

Have you ever wanted to move a subsite from a top level site into it's own Site Collection with it's very own Content Database? I have, and just recently I was able to do this with some help from other blogs, so here is how you do it in SIX simple steps.

STEP ONE: Export the subsite using the following stsadm command. Subsititue the url, filename and versions as required. This may create several files if there is a good amount of data.
stsadm -o export -url -filename c:\ -versions 4

STEP TWO: Create a new content database for your new site collection from Central Admin. Navigate to Central Admin -> Application Management -> SharePoint Web Application Management -> Content databases. Then click on Add a Content database. Once in the next screen ensure that you have the correct Web Appplication selected, if not then change it now. The only thing you should change in this screen in the Database Name. I usually name the Database WSS_Content_[SiteCollectionName], replacing [SiteCollectionName] with whatever you want.

STEP THREE: Put all content databases in Offline mode except for the one you want your new site to use. You do this via Central Admin -> Application Management -> SharePoint Web Application Management -> Content databases. Click on each Content database, change the Database status to Offline and click OK.

STEP FOUR: Create a new Site Collection via Central Admin -> Application Management -> SharePoint Site Management -> Create Site Collection. Make sure that the correct Web Application is selected, if not then change it now. Enter the Title, Description and the Site Collection name in the box after /sites/. Don't use any spaces. For this example I will use sc1. Also set the template to blank, but I don't think this matters. Finally, ensure a farm account is used for the secondary Admin of the new Site Collection.

STEP FIVE: Import the subsite exported earlier into the new Site Collection at the stsadm command using the following command.
stsadm -o import -url -filename c:\ 

STEP SIX: Go back into Central Admin and put all Content Databases back Online. Done! Well almost done. You should now go back to the Subsite that you just copied (, ensure that the site does not inherit permission from it's parent, then remove all the security so that no-one can see it except for the Admins. Once you are happy with the new Site Collection ( it will be safe to delete the original Subsite. Finally, make sure you tell your users about the new URL to their new Site Collection.

COMMENTS: One thing that is not copied over is permissions, so you will have to redo these, however you now have a New Site Collection with it's own Content Database and Security!

I hope that someone finds this as useful as I did when I had to do the exact same thing just last week.

Dave Stuart

Comments are closed