Site templates can be very useful for an easy custom starting point for common site usage. Site templates can be saved from any site (except publishing sites for some reason…
). These site templates are stored into the site collections site template gallery as STP files. Once they are created a user with permissions can create sites within that site collection based on that template.
What happens if you want to use that site template to create a top level site in a site collection. When creating a site collection you are only shown available templates that are global to the entire farm. If you want to use your custom site template when creating a site collection follow the instructions below…
-
Create your site template (I assume you already know how to do this, but if not go to the site settings of any web and select "Save Site as Template")
-
Navigate to the site template gallery where the site template is saved. This will be under Site Settings -> Galleries -> Site Template Gallery.
-
Save the custom site template to the SharePoint server local drive.
-
Remote Desktop into the SharePoint server where the STP file has been saved, and open a command prompt.
-
Use STSADM to upload the template into the global templates list by using the STSADM -o AddTemplate command. For help with the AddTemplate command use STSADM -help addtemplate.
obviously make sure you either specify the path to stsadm in the command line, or as part of the server's PATH variable. Also, if you are not in the folder where the STP file exisits, you will have to specify the full path to the STP file as well. Remember if there are spaces anywhere in the path you will have to surround the full path with double quotes.