title: Super complicated: Enabling the Publishing feature in SharePoint 2010 in the new site collection after deleting the previous root site fails
body: <p>This is not a simple Site Action | Site Settings | etc. question.  It's way more comlicated.</p>
  
  <p>After an accidental <strong>deletion</strong> of the <strong>root site</strong> WITH <code>publishing enabled</code>, I created a new root site and tried to activate publishing on it (in the root).  It failed with the error message pointing to SITE and WEB:  </p>
  
  <p><strong>Site</strong>  </p>
  
  <pre><code> The feature being activated is a Site scoped feature which   
   has a dependency on a Site Collection scoped feature which has   
   not been activated. Please activate the following feature before   
   trying again: SharePoint Server Publishing Infrastructure   
   f6924d36-2fa8-4f0b-b16d-06b7250180fa "
  </code></pre>
  
  <p><strong>Web</strong></p>
  
  <pre><code>The Site scoped feature being activated has a dependency on hidden   
  Site scoped feature     
  
  'FeatureDefinition/22a9ef51-737b-4ff2-9346-694633fe4416'  
   (ID: '22a9ef51-737b-4ff2-9346-694633fe4416').   
  
  Hidden features cannot be auto-activated across scopes.   
  There may be one or more visible Site scoped features that   
  auto-activate the dependent hidden feature."
  </code></pre>
  
  <p>OK, no panic!!!  I think it was because the Publishing enabled was writtent somewhere in the guts of <code>SP database</code>.  No problem.</p>
  
  <p>I ran the<br>
  <code>PowerShel Disable-SPFeature Publishing -Url "http://myrootsite", then Enable-SPFeature Publishing -Url "http:/myrootsite"</code>.</p>
  
  <p>Half is fixed: my Web portion of the error message is gone BUT the Site portion of the error message is still here preventing the publishing.</p>
  
  <p>How can I disable "<code>publishing on the "Site" level using the PowerShell and enable it again</code>.<br>
  I am kinda stack here :-(</p>