Site Definition: Site definition is stored on the SharePoint Web Front End Server’s file system in the 12 Hive folder. It consists of files like onet.xml, default.aspx, resources files etc.
Site Template: Site Templates are stored in the database (accessible as *.stp file from site templates gallery through front end) and are created by using an existing site, with or with out its specific content as a model.
The following are the differences between Site definitions and Site templates.
| Description | Site Template | Site Definition | |
|---|---|---|---|
| 1. | Storage | Database | 12 Hive |
| 2. | Easy to create | Yes | No |
| 3. | Needs server access to install | No | Yes |
| 4. | Available for publishing sites(when Office SharePoint Server Publishing Feature is activated) | No | Yes |
| 5. | Provisioning Event Availble (to execute code) | No | Yes |
| 6. | Can be changed after sites are created (Resource files can be changed) | Yes | No |
| 7. | Create new content types (MS Best practice) | No | Yes |
| 8. | Activate Feature during creation | No | Yes |
| 9. | Performance | Low | High |
| 10. | High level of customization (introducing new file types, view styles, Modifying edit menu etc) | No | Yes |
| 11. | Sites/site collections refer to these files from the central location and hence when changed later at the central location will be reflected in all sites/site collections | None | Resource Files (Master pages, layout pages, css and javascript files) |
| 12. | Can be restricted for availability to a specific web app | No | Yes |