Template options
There are four main options for creating a site template that can be used to create a new site or subsite. They include site definitions, feature stapling an existing site definition, exporting site templates via the UI, and custom code. Each of these options has its own benefits and limitations.
Site definitions
A site definition is the root definition of a site and its features in XML. When a site is created, a site definition is referenced, it will always have that dependency, and it cannot be changed easily. The base SharePoint templates including blank, team site, blog site, and so on are all defined as site definitions.
In the earliest versions of SharePoint it was very common, and even recommended, for you to define your own site definitions by creating a feature and including a custom onet.xml
. The problem with this approach is the dependency that it creates and the difficulty involved with upgrading or migrating that site to another farm or during version upgrades...