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.
C:\source\site-templates>