I've been asked to Hide the Publishing Feature for the farm in Sharepoint 2007.

Now I can go on the file system and change the feature definition but as we all know messing about on the 14 hive with files that dont belong to you is a nono.

I can't remember, probably because you can't do it, if it is possible to hide a feature, especially one that doesn't belong to you or can publishing just be removed ?

<Edit> By removed I mean Hidden, not deactivated or uninstalled </Edit>

If anyone can tell me if it's possible in another way to editing the file great, if you know its impossible a link to the WhitePaper that says don't be so stupid would also be good.

4 Answers 4


Have a look at the Zevenseas Feature Blocker.

  • I have to mark this as my answer, whilst the others all had great points this even points to an article that explains whats going on so I can just imlpement part of the solution instead of all of it. I recommend everyone take a loko at this, ControlAdaptors Whose ever heard of them!
    – BinaryJam
    Commented Apr 14, 2011 at 14:59
  • I tried this on my system and could not get the WSP to work out the box, I did install it to all webs (else the file system changes would not replace the App_browser files obviously) but nothing appears in the list of features. The theory sounds great but I cant get this solution working on my rig, it might be fine for others, worth a try at least.
    – BinaryJam
    Commented Apr 18, 2011 at 13:53

Could you not have a hidden feature of your own that would set the Hidden property to True on an instance of SPFeatureDefinition relating the Publishing Features?

Get this: http://msdn.microsoft.com/en-us/library/microsoft.sharepoint.administration.spwebapplication.features.aspx

Get the SPFeature that you want, then set the SPFeature.Definition.Hidden property to true.

Not sure how well this would work, worth a shot though. Try it in a Console app first.


There is an attribute of the feature element that enables you to make it "hidden", which means it doesn't appear in the user interface, which is what you are looking for. But that is intended for when you are creating your own custom features, particularly for feature dependencies where it doesn't make sense to activate a particular feature on its own.

You could probably hack the publishing infrastructure and publishing features XML in the SharePoint Root Folder (trying not to call it the "14 hive") but it would be a really bad idea for a number of reasons.

  • Yes that is what I meant by hacking files on the system. Really bad is also what I thought. But I specifically need the WhitePaper so I can shove it in peoples faces and say - "Nooooo Stupid!"
    – BinaryJam
    Commented Apr 14, 2011 at 14:04

First of all you are right, one should not mess with 12 hive in SharePoint 2007 (14 hive is the name of same folder in SharePoint 2010).

In SharePoint 2007 you can deactivate/uninstall feature via STSADM deactivatefeature command and STSMADM uninstallfeature command. But when it comes to Publishing infrastructure, as it is built-in feature I would not deactivate it as there might be other features that require this feature in order to function properly. I cannot recall now if it was Publishing, but I have seen some broken SharePoint farms when people attempted to make some uncommon modifications.

  • 1
    The Publishing Infrastructure adds some great functionality, I'd rather see it stay around in a deactive state than have it disabled altogether. Commented Apr 14, 2011 at 13:53
  • Yup, my point exactly. Commented Apr 14, 2011 at 13:53
  • It's not active on many sites so de-activating won't do anything to Hide the feature to prevent Site Admins activating it. Should have said "Dont want site admins activating it"
    – BinaryJam
    Commented Apr 14, 2011 at 14:06
  • There is also uninstall command... Updated. But I do not understand the question here, you want to just hide not uninstall? What's the reason here, who want's this? Commented Apr 14, 2011 at 14:10
  • Yes the requirement is Hide not uninstall, and besides uninstalling publishing would be far far worse then editing the feature def file and setting it to hidden. As for who wants it, the customer wants it. The customer may be an idiot, mis-informed, deluded or many of these things but they pay the bill and don't want site admins enabling publishing.
    – BinaryJam
    Commented Apr 18, 2011 at 13:49

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.