SharePoint Stack Exchange is a question and answer site for SharePoint enthusiasts. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

Is it possible to turn off a feature using featuring stapling? How could you turn a feature off for all new sites that are created by default?


I have a feature staple to turn on publishing on each site. I want to turn off Wiki Page Home Page so that when you go to add a page the wiki page is not the default.

share|improve this question
up vote 5 down vote accepted

Don't think it is possible (anyone, fell free to correct me). But you can always do the opposite - staple a custom feature and deactivate the target features from the custom feature event receiver.

share|improve this answer

It depends. Normally you can just set the ActivateOnDefault=False in the feauture. Otherwise you can add an EventReceiver containing code to "turn off" the feature(s) you want.

You do this by opening your solution in Visual Studio > right click on the solutions top-level > Add new item > Event Receiver <-- By this stage a dialog will open in which you choose on what occation this EventReceiver should trigger and what phase of an event you want to manipulate, in this case the "Web Provisioned" phase. It then generates an EventReceiver in which a WebProvisioning method will be available to modify for your needs.

I hope this helps.

share|improve this answer

You can remove the feature reference in onet.xml

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

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