Tip #41: How to find the site definition being used for a site?

Rate this item
(0 votes)

Sometimes you have a already created site but wanted to know the site definition of that site, or gets the name of the site definition from which the site template that was used to create the site is derived. There are several steps to get that template

First method

  1. Navigate to the “Central Administration –> Application Management –> Site Collection List” and choose the site you are trying to find the template for
  2. Write down site "Title” and “Database name” values
  3. Open SQL management studio and execute the following query for content database that you find from previous step
       1: SELECT Title, WebTemplate,ProvisionConfig
       2: FROM dbo.Webs
       3: WHERE Title = '<title of your site>'
  4. Write down the number in “Web Template” column
  5. Navigate to this site http://blumenthalit.net/blog/Lists/Posts/Post.aspx?ID=45 and find definition is associated with that ID
Take into accound that Microsoft doesn't recommend use SharePoint database directly - it is unsupported, could potentially damage your SharePoint installation, and could lead to a lack of support from Microsoft.

Second method

Using SharePoint API SPWeb.WebTemplate property (you can use PowerShell for this). Sample is there

Third method

If you have SharePoint Service Pack 2installed you can use STSADM -o enumallwebs

Leave a comment

Make sure you enter the (*) required information where indicated. HTML code is not allowed.