0

We have a set of custom site definitions, around 12 in total, that makes up a large sharepoint 2010 intranet application (circa 40,000 sub-sites) that has been deployed for a few years now.

One of these site definitions now needs some tweaks. Namely, a new page adding to it with some pre-configured web parts, and inserting a new web part into the landing page.

I understand I can create a new feature for this update, and associate it with the site definition in question, and that's all fine for new sites being provisioned from this site definition, but how do I go about applying the same changes to the existing 40,000 sites, which also need the update?

Thanks for any assistance, Tony

3
  • Remember that any change in onet.xml of a custom site definition is unsupported you need to add the new functionality using feature stapling. This is exactly why you should not use custom site definitions, but web templates in SharePoint 2010!! Commented Sep 25, 2012 at 18:38
  • Should have mentioned the site definitions are just containers for features in this case. Commented Sep 25, 2012 at 22:55
  • it doesnt matter really. You cannot change the ONET.XML manifest, as long as you dont do that you are good :) Next time use Web Templates ;) Commented Sep 26, 2012 at 15:09

2 Answers 2

5

You could loop through all the existing sub-sites with a PowerShell script, and use the feature cmdlets to activate the feature on existing sites. Using this method you could also insert some logic/conditions to enable or not enable the new feature if that is useful.

1
  • I like this idea, but have a follow on question. Is it wise to create new features each time, which was my plan, or should I be using the feature upgrade capability and the doing the above loop to upgrade each existing site? Commented Sep 25, 2012 at 22:58
1

You need to develop what I call a "service pack" to deploy against the existing sites. In this case your service pack would contain a module with the site pages and any other resources that might be required.

If your solution is only adding new artifacts to the site, the process is pretty straightforward. If you are changing things like list structures, it's still doable but you might have to write some code to make that happen. For example, if you need to update the quick launch you'll have to write code in a Feature Receiver to add the new entries.

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.