SharePoint Site Definition Provisioning Order

This is just a re-post of something posted by Mirjam van Olst back in April of 2009. A friend recently pointed it out to me, and it helped me figure out why some feature code I was editing on wasn’t working as expected.

Here’s the meat of the original post:

Site Definition Provisioning Order

  1. Url for the site is created
  2. Global onet.xml is provisioned.
  3. Site collection (SPSite) scoped features defined in onet.xml are activated in the order in which they are listed in the onet.xml.
  4. Site collection scoped stapled features are activated in random order.
  5. Site(SPWeb) scoped features defined in onet.xml are activated in the order in which they are listed in the onet.xml.
  6. Site (SPWeb) scoped stapled features in activated in random order.
  7. List instances defined in onet.xml are created.
  8. Modules defined in onet.xml are processed (and thus this is the moment at which the default.aspx file and other aspx files defined in the modules are added to the site.)

And here’s a link to the post.

Thanks, Mirjam!