How to find the SharePoint Site Template being Used

How to find the site template of an existing SharePoint site? There are many ways to find the site definition being used for a site, Here are some:

1. Use SharePoint Manager to find the SharePoint site template. Navigate thru the site, and look for "Web Template" as in the below picture.

2. Stsadm: Get current site template in SharePoint
stsadm.exe -o enumallwebs -databasename <content-db-name> > Template.txt
Now, Open the template.txt file and check for template. This trick can be used to find site template name for SharePoint 2010 even.
sharepoint find site template id

3. Sql Server: SQL Server is the back-bone of SharePoint, So lets use the SQL Query to determine SharePoint site template used:
SELECT Title, WebTemplate FROM dbo.Webs WHERE Title='Your Site'

4. You can programmatically use SharePoint Object Model to find site template of SharePoint site. Just query  SPWeb.WebTemplateId. Here is the reference table for SharePoint 2007:
Template IDCodeDescription
1 STS  "windows SharePoint Services Site", "Team Site", "Blank Site", "Document Workspace"
2 MPS  "Basic Meeting Workspace", "Blank Meeting Workspace", "Decision Meeting Workspace", "Social Meeting Workspace", "Multipage Meeting Workspace"
3 CENTRALADMIN  "Central Admin Site"
4 WIKI  "Wiki Site"
7 BDR  "Document Center"
9 BLOG  "Blog"
20 SPS (OBSOLETE)  "SharePoint Portal Server Site"
21 SPSPERS  "SharePoint Portal Server Personal Space"
22 SPSMSITE  "Personalization Site"
30 SPSTOC (OBSOLETE)  "Contents area Template"
31 SPSTOPIC (OBSOLETE)  "Topic area template"
32 SPSNEWS (OBSOLETE)  "News area template"
33 SPSNHOME (SubWebOnly)  "News Home template"
34 SPSSITES  "Site Directory area template"
36 SPSCOMMU (OBSOLETE)  "Community area template"
38 SPSREPORTCENTER  "Report Center Site"
39 CMSPUBLISHING (SetupPath=SiteTemplates\PUBLISHING)  "Publishing and Team Collaboration Site"
40 OSRV (SetupPath=SiteTemplates\OSRV)  "Shared Services Administration Site"
47 SPSPORTAL  "Corporate Intranet Site"
50 SRCHCEN  "Search Center"
51 PROFILES  "Profiles"
52 BLANKINTERNETCONTAINER  "Internet Presence Web Site"
53 BLANKINTERNET  "Publishing Site", "Press Releases Site", "Publishing Site"
54 SPSMSITEHOST  "My Site Host"
90 SRCHCENTERLITE (SetupPath=SiteTemplates\SRCHCENTERLITE)  "Search Center Lite"
6221 PWA (SetupPath=SiteTemplates\PWA)  "Project Web Access Site"
6215 PWS (SetupPath=SiteTemplates\PWS)  "Project Workspace"
14483 OFFILE  "Records Repository", "Records Repository"

5. Find template used to Create Site using PowerShell:
To get SharePoint site template id using PowerShell: 
$web = Get-SPWeb ""
Write-Host $web.WebTemplate "#" $web.WebTemplateId 

You can get the list of site templates by using a PowerShell Cmd-let:

Here is the reference table for SharePoint 2010:
Site Template IDSite Definition
STS#0Team Site
STS#1Blank Site
STS#2Document Workspace
SGS#0Group Work Site
VISPRUS#0Visio Process Repository
MPS#0Basic Meeting Workspace
MPS#1Blank Meeting Workspace
MPS#2Decision Meeting Workspace
MPS#3Social Meeting Workspace
MPS#4Multipage Meeting Workspace
ACCSRV#1Assets Web Database
ACCSRV#3Charitable Contributions Web Database
ACCSRV#41Contacts Web Database
ACCSRV#6Issues Web Database
ACCSRV#5Projects Web Database
BDR#0Document Center
OFFILE#1Records Center
BICenterSite#0Business Intelligence Center
SPSMSITE#0Personalization Site
SRCHCEN#0Enterprise Search Center
SRCHCENTERLITE#0Basic Search Center
ENTERWIKI#0Enterprise Wiki
CMSPUBLISHING#0Publishing Site

6. Last but not least: Go to the view source of the SharePoint page >> Search for "SiteTemplateID" to find site template name SharePoint 2010.
find template used sharepoint site


  1. How to find template in SP 2013?

    1. All the above methods works for SharePoint 2013 also.

  2. All this is good information. Consider this scenario:
    Site with 10 Site templates in the Solution gallery.
    The site has 39 sub-sites of which at least half have been created off of any of the above templates.
    How do I determine:
    1. If the sub-site was created off a Site template
    2. Which Site template it was created from.

    Looking in powershell, almost all of them how the template of "STS#1", which doesn't really answer which site template it was generated from in the Solution gallery.

    Thanks for any help you can give.


Please Login and comment to get your questions answered!

Powered by Blogger.