Posted by: gavinadams | 3 July, 2007

Creating site collection templates

[I've been meaning to update this post for quite sometime. Please don't do this procedure even though it was documented in MSDN. If you do this when you create a site from this site template a lot of the functionality will be broken, eg workflows etc.  The only proper way to create your own site templates to create site collections from is by using custom site definitions (or copying and modifying an existing site definition).]

This guide shows how to create a site collection template that will appear on the create site collection screen from central admin or from the create site page if self-service site management is enabled.

  1. First create a site collection based on what ever template that you would like to start with for example the Collaboration / Team Site template. Customise the template to what you would like. For example create additional document libraries and set versioning.
  2. From the site settings, Look and Feel , Save site as template. Give it a file name, template name and description. Optionally choose if you would like any content that you have added to the template to be included.
  3. Once this is done it will create the template.stp in the site template gallery. Browse to this gallery and download the file. Once you have this file copy it to your sharepoint server. Also if you are going to re-use the template you might want to delete the template from the gallery and then delete it from both recycle bins in the site collection recycle bin.
  4. To add the template to central administration site templates you will need to use stsadm. I recommend that you add the path to the bin directory containing stsadm.exe to the system environment variables.

C:\source\site-templates>stsadm -o addtemplate -filename “project-simple.stp” -title “Project site – simple” -description “Project site template with a simple structure”

Operation completed successfully.

IIS must be restarted before this change will take effect. To restart IIS, opena command prompt window and type iisreset.

Deleting a template from the command line. Below is a code snipet of how to list the templates installed and then how to delete the template based on its title.

C:\source\site-templates>stsadm -o enumtemplates

IT Project Site – Language: 1033 – Site Template: _GLOBAL_#0 – Template Id: 1

C:\source\site-templates>stsadm -o deletetemplate -title “IT Project Site”

Operation completed successfully.

IIS must be restarted before this change will take effect. To restart IIS, open
a command prompt window and type iisreset.


About these ads


  1. [...] underneath managed paths we are trying to use a custom site template. (I have previously posted the procedure I use to create and load a [...]

  2. i want to ask about smthing , i create a new application pool and then i created new web application, then i created new site collection and i gave it name, but when i click on the url , the page is empty and nothing in it,what can i do?

  3. hi… question…. i have created a site collection that has a top site and a few subsites… how do i save the entire site collection as a template?

  4. [...] from Gavin’s: This guide shows how to create a site collection template that will appear on the create site [...]

  5. I have followed the instructions however I get an error when starting the new site collection indicating that “This page is not using a valid page layout. To correct the problem, edit page settings and select a valid page layout.”

    Can you please help.

    Thank you.


  6. Hi, I want to know how to make a site coleection template (with subsites). I’m using Portal Template and in the configuration dosn’t appear Save this site as template

  7. I am having a similar problem with site collections created from a template and was wondering if anyone else is having this problem… After creating a new site collection from my template, I go to “Edit Page” and “Add a web part” and the “All Web Parts” section is empty, preventing me from adding the common default web parts to teh page.

  8. Hi Amy.
    You might be running into a bug.
    Checkout the post-sp1 rollup hotfixes.

    Included in the wss rollup is a hotfix for the following.
    This might be related to the problem that you are having.

  9. Hi Moliway,
    you cannot use these custom site templates to create subsites. They are also not designed to work with sites that have the publishing features enabled.

    To do what you are after you will need to create a custom site definition. Talk to your developer on how to do that.

  10. Thanks for the responses! I REALLY appreciate the help. I guess there is a lot to consider. I have been a little nervous about installing SP1, so we do not have it yet. Also it looks like the hotfixes have caused some people new problems…
    I wish SharePoint was as easy as it is supposed to be!!!!! It seems for every new feature I try to use I end up with more and more problems.

  11. Hi I have a question, when creating a Site Collection Template to be visible in central admin with the stsadm. Do all content types most importantly for me come across to new site collections with the saved template. I understand that document libraries, content and versioning comes across. But does all Content Types come across?

  12. Gavin, I read this thread and I have a couple of questions. If I create a site template, it seems it is local to the site collection I create the site in. If I have multiple site collections, is there a way to use the site template across those site collections without having to copy it to each …/_catalogs/wt/ folder?
    Do I read correctly that there is a way to create a custom site definition that provides me with a template to create a site with subsites?
    National Semiconductor

  13. This worked but the content types were not copied over. The libraries that had content types enabled got a list content type with a parent of document rather than a parent of a site content type. Any way around this?

  14. Hi,
    When I run this command..I get command line error.However everything is same as specified in the article.

  15. Hi,
    If you provision new sites using site templates you will run into the following issues
    1. Using a site template created from a publishing site is unsupported( you can still create the template by manually typing _layouts/savetmpl.aspx)
    2. Any content types will not be copied over. Content Types are not part of the site templates.
    3. Site template will not include any new features that were installed on the source server and used in the site.

  16. The title of this article is “Creating site collection templates” and therefore led me to believe that I could create a template from my site collection.
    However, saving a site as a template does NOT include sub-sites, so I fail to understand why this article is so titled? It is not possible to create a ‘site collection template’ as far as I can determine.

    I wish to move a site collection to a new server in a different domain. If you have any other advice on this please do let me know.

    Thanks in advance

  17. Glad I read the responses as there are many ‘got-yas’ with attempting to create a site collection from a custom template. Given these issues I think for me it will be better to create the new site collection from the standard templates, then save our subsite as a template(w/content), and then create a new subsite from this saved template within the new site collection.

  18. How can we add Custom site templates in sharepoint 2010 ?

  19. Nice post. I was checking continuously this weblog and I’m impressed! Very helpful information particularly the last part :) I care for such info a lot. I used to be looking for this particular information for a very lengthy time. Thanks and best of luck.

  20. Candy Crush Saga is a sweet-matching sport produced by King.

    This chart-dominating recreation is offered on tablets, all iOS products, Android and Fb!
    In the game, you are introduced with a board of distinct colored and shaped candies.
    The objective is to match 3-or-more like candies jointly to obvious them.
    Each degree has a various objective–some require a bare minimum rating, some
    demand certain moves and other people are timed.

    In the game of Candy Crush Saga, you are presented five lives.
    For each level you do not go or have to repeat, you will lose a life.
    Lives refill one particular at a time, each every 30 minutes.

    But for the impatient, you can purchase a complete set
    of lives for $.99. Although Candy Crush Saga is one hundred% free of charge to engage in,
    it embodies the freemium model and tries to incentivize users into spending cash.

    If you get stuck on a stage, you can get boosters, further moves or more lives.

    The recreation, which was unveiled in April of 2012, has a
    total of five hundred levels and King routinely adds far more.
    Sweet Crush Cheats has guides to every single level,
    ideas for gameplay, cheats and more!

  21. Cozy Comfort Plus can help you ove one step closer to having a cozier home.
    t already have one, obtain a drain pan and
    position itt under the filter housing to catch any drips when you pull the filter
    out. In fact, US per capita consumption is 14 times that of China.

  22. What splendid graph. Regardless of the very best efforts
    with the Earth Financial institution your once-a-year army finances possesses usually relied about Miley Cyrus naked up to a point,
    however right now more in which previously. From
    the lighting with this totally free industry must be screened.
    Machiavellian governmental policies can be rife.
    Are each of our commanders warranted in seeking as well as keeping politics energy?
    Comparing overseas relations because end on the century could be just like
    noticing Miley Cyrus naked right now, and its particular
    equal within the 1800s.

  23. You really make hay day hack appear really easy with your presentation but I to find
    this subject be actually something which I believe I might never understand.

    It seems too complicated and extremely large for me. I am taking a
    look forward to your next Publish , I will attempt to get the hang of it!

  24. You really make Call of duty ghosts prestige hack appear so easy with your presentation
    however I in finding this subject be really something which I I’d by no means understand.
    It seems too complicated and very extensive for me. I am looking forward on your next put up , I will dangle of it!

  25. Howdy! This blog post couldn’t be written much better!
    Looking through this article reminds me of my previous roommate!

    He continually kept preaching about this. I’ll forward this post to him.
    Fairly certain he will have a great read. Thanks for sharing!

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s



Get every new post delivered to your Inbox.

%d bloggers like this: