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 through the site, and look for “Web Template” as in the below picture.

spm

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 "http://sharepoint.crescent.com"
Write-Host $web.WebTemplate "#" $web.WebTemplateId 

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

Here is the reference table for SharePoint 2010:

Site Template ID Site Definition
STS#0 Team Site
STS#1 Blank Site
STS#2 Document Workspace
BLOG#0 Blog
SGS#0 Group Work Site
VISPRUS#0 Visio Process Repository
MPS#0 Basic Meeting Workspace
MPS#1 Blank Meeting Workspace
MPS#2 Decision Meeting Workspace
MPS#3 Social Meeting Workspace
MPS#4 Multipage Meeting Workspace
ACCSRV#1 Assets Web Database
ACCSRV#3 Charitable Contributions Web Database
ACCSRV#41 Contacts Web Database
ACCSRV#6 Issues Web Database
ACCSRV#5 Projects Web Database
BDR#0 Document Center
OFFILE#1 Records Center
BICenterSite#0 Business Intelligence Center
SPSMSITEHOST#0 My Site Host
SPSMSITE#0 Personalization Site
SRCHCEN#0 Enterprise Search Center
SRCHCENTERLITE#0 Basic Search Center
SRCHCENTERFAST#0 FAST Search Center
ENTERWIKI#0 Enterprise Wiki
BLANKINTERNETCONTAINER#0 Publishing Portal
CMSPUBLISHING#0 Publishing 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

Salaudeen Rajack

Salaudeen Rajack is a SharePoint Architect with Two decades of SharePoint Experience. He loves sharing his knowledge and experiences with the SharePoint community, through his real-world articles!

3 thoughts on “How to find the SharePoint Site Template being used?

  • January 26, 2018 at 7:05 PM

    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.

    Reply
  • October 31, 2017 at 4:59 PM

    How to find template in SP 2013?

    Reply

Leave a Reply