Convert a Subweb to a Site Collection

From SharePoint Knowledge Base

Jump to: navigation, search

This article explains how to convert a subweb to a site collection. Strictly speaking, you don't "convert" the subweb. Instead, you export the content from an existing subweb to a new site collection. This process requires you to have local administrator rights on one of the SharePoint servers.

Export the Subweb using STSADM

The first step is to export the subweb using the STSADM command line utility. First, connect to the SharePoint server. Open a command prompt and navigate to the folder containing the STSADM executable. Next, execute the following command:

 stsadm.exe -o export -url http://myserver/mysubweb -filename c:\mysubweb.bak -includeusersecurity -versions 4

This will export all content of the subweb to a file called mysubweb.bak located on the c:\ drive. By the way, you can choose any location you want to export the file - it doesn't have to be on the c:\ drive.

Create a New Site Collection

Next, create a new site collection in SharePoint central administration. If possible, use the same site template when creating the new site collection as the template that was used to create the subweb you exported. Also, make sure that your account (or the account you are logged into the SharePoint server as) is set up as a site collection administrator. This is required for the content import (next step) only.

Once the new site collection has been created, double check that all needed features are activated. If you chose the same site template as the exported subweb then you probably will have everything you need. But just to be sure, check the Site and Site Collection features on the new Site Collection with those activated on the original site.

Import Content to the New Site Collection

The last step is to import all of the exported content. On the SharePoint server, open a command prompt and navigate to the folder containing STSADM. Next, execute the following command.

 stsadm.exe -o import -url http://myserver/sites/mynewsitecollection -filename c:\mysubweb.bak -includeusersecurity

Once complete, all content should now be moved into the new site collection.

Personal tools