[MissingSiteDefinition] 1 Sites in database [Colgate_WSS05] has reference(s) to a missing site definition, Id = [16781], Lcid = [1033]. The site definitions with Id 16781 is referenced in the database [Colgate_WSS05], but is not installed on the current farm. The missing site definition may cause upgrade to fail. Please install any solution which contains the site definition and restart upgrade if necessary.

SELECT Title, WebTemplate
FROM dbo.Webs
ORDER BY WebTemplate

This query gives me :

Title              WebTemplate
Colgate Test Site  16781
Request Area       16781
FSO                16781

Now how do I go by fixing this error? The missing site definitions are old and we don't need them in SP2010, so I dont need to find the old site definition and install it in sp2010.

(Note: The migration happened before I got here so please don't lecture me. :) I just need a solution to take care of this issue)

  • 1
    And just to say because it's very important, querying the SharePoint databases will void your support with Microsoft. Commented Jul 26, 2011 at 15:14
  • Eric: How would they know I query the database? Commented Jul 26, 2011 at 15:22
  • 2
    Just to be perfectly clear, querying (i.e. selecting) the database will not void support, but inserting/updating data or altering the schema certainly will.
    – Rob D'Oria
    Commented Jul 26, 2011 at 15:23
  • You said the migration happened before? So you're already on SP2010? If I were you, I'd go back to the pre-upgrade environment, prepare it properly (by doing the normal upgrade preparation), and start it again - someone has obviously ran the upgrade without reading any guidance or documentation, seen errors, and left the company.
    – James Love
    Commented Jul 26, 2011 at 15:25
  • 1
    Specifically, you want to find the webtemp.xml with a Template ID of 16781 (usually in 12\TEMPLATE\1033\XML). If you can find that /anywhere/ (hint: look for old backups), then there'll be a corresponding ONET.xml kicking around somewhere close (usually in 12\SiteTemplates(then a folder)). The folder name here is the "Name" of the template in webtemp.xml that has that ID.
    – James Love
    Commented Jul 26, 2011 at 15:41

2 Answers 2


If the websites are no longer needed (you said the site definitions are no longer needed; a site cannot live without it's definition), try deleting them from Powershell? Should also shut up the errors:

Remove-SPWeb http://technet.microsoft.com/en-us/library/ff607890.aspx


You could try uninstalling it via PowerShell:

Uninstall-SPWebTemplate "templatename"
  • @hmm. Those site def are in defferent databases so above cmdlet not uninstalling them. hmm, do I need provide the database name? Commented Jul 26, 2011 at 15:19
  • There is no database argument on that command...its scope is Farm. Short of starting over and migrating/upgrading the right way you probably have to live with the mistakes of your predecessor or consult with Microsoft on way to repair these issues without impacting your supportability.
    – Rob D'Oria
    Commented Jul 26, 2011 at 15:40

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.