Please note that this article mainly applies to SharePoint Online 2010. Although it can be used in both SharePoint Online 2013 and SharePoint On-Premises installation, there are better options available.
If you are new to SharePoint Online 2010 and Office 365 administration, it is important to understand what would be your starting point for control in logical topology hierarchy as SharePoint Online administrator. You don’t have any control over web application creation process or managing IIS web sites. Typically, as a SharePoint Online administrator, one of your first task is to create and manage Site Collections.
By default, Microsoft provisions three default site collections for each tenant in SharePoint Online 2010 – Default Root Team Site based Site Collection, Search Site Collection, and My Site Host Site Collection. Only way to create site collection in SharePoint Online 2010 is provisioning site collections from SharePoint Online Administration page. There are no web services call or APIs or PowerShell commands you can use to automate site collection provisioning process in SharePoint Online 2010. Although there are PowerShell commands available in SharePoint Online 2013 for site collection automation, if you are using SharePoint Online 2010, you won’t have any other approach of automating site collection provisioning process apart from manual approach.
Apart from not able to automate Site Collection provision process in SharePoint Online 2010, many times in real world, you are required to provision site collection based on custom site template. E.g. for large corporate intranet, you may want to standardize site collection templates for different departments like HR, Legal, Finance, IT etc.
Although nothing new for seasoned SharePoint professionals, I will walk through only option available for provisioning site collections in SharePoint Online 2010 based on custom site templates in this article. Please note that if you have publishing features enabled on your site template, you can’t save site as template. If you are planning to use publishing features on your site template, either it must be added/activated once site is created based on site template or you can’t use approach shown in this article.
Note: If you are creating site collections based on site templates shown in this article – Please read my colleague Patrick O’Toole’s article to understand caution you need to take with this approach – http://sharepointotoole.wordpress.com/2013/01/31/warning-when-using-a-site-template-for-a-site-collection/
Step 1 – Save Site as Site Template
Your first step is to build custom site template in browser. Typically you would work with business to define base site template consisting calendar, announcements, default document libraries, and other business components. If you have any custom solutions like branding, custom sandbox solutions, all the components needs to be applied later. Don’t plan to save custom solutions in your site templates unless it’s really necessary.
In my walkthrough, I have created basic site template called “Department Site Template” with some basic components like announcements, helper notes, logos, calendars, and shared documents on home page along with standard lists like contacts, discussion lists etc. Depends on your requirement, this can be extremely complex and rollup lots of information from sub sites along with custom solutions.
Once you have defined your site template, your first step is to save site as template from Site Settings -> Save Site as Template.
Specify site template name and whether you want to include content or not. In most scenarios, you would like to include pre-defined and pre-populated content in site template.
Once site is saved as template, you can download as WSP file. If your template site is sub site, please ensure that saved site templates are stored in Site Collection solution gallery. You can download WSP file by right clicking the site template. In my case, it’s Department Template v1.wsp file.
Step 2 – Create New Private Site Collection using Select Template Later option
As I have explained earlier, by default, there are only three site collections provisioned in SharePoint online 2010 whenever you provision new tenant.
To create new site collection based on site template, you must create new private site collection from SharePoint Online Admin Center and select Custom Tab and “Select Template Later” in template section.
Once SharePoint Online provisions site templates, it should be visible on Site Collections gallery in SharePoint Online Admin Site. In my case, HR Site collection shows up as new site collection in gallery.
Step 3 – Prepare Site Collection to use Custom Site Template
Because during Site Collection provisioning process, you have selected option to select template later, whenever you navigate HR site collection very first time, it would ask you to select template.
To ensure your site collection template is available on the HR site collection, on template selection page, click on the Solution Gallery link and upload your custom site template WSP and activate the solution.
Step 4 – Use Custom Site Template for Site Collection Template
After successfully uploading Site template solution and activation, navigate to the HR site collection again and it will prompt you to select template again. On template selection page, now Custom Tab should be visible and your custom site template should be available.
Selecting custom site template, SharePoint should start initiating process for applying new template to HR site collection and should prompt you whether you wanted to use default names for security groups or customize.
After successfully selecting security groups, SharePoint applies custom site template to the Site Collection and your final HR site collection is ready to use with custom site template components. At this moment, you can activate any features like publishing features or upload any custom solutions like branding solutions on your site.