To make a site publishing type, we need to activate "Office SharePoint Server Publishing Infrastructure". Sometimes, activating Office SharePoint Server Publishing Infrastructure feature on a site collection throws error. There are two ways to activate the same feature.
1) Clicking on Activate button in feature gallery and
2) By using stsadm commands.
To activate publishing infrastructure feature through commands, use the below commands:
stsadm -o activatefeature -filename publishing\feature.xml -url http://sitecollectionurl -force
stsadm -o activatefeature -filename publishingresources\feature.xml -url http://sitecollectionurl -force
stsadm -o activatefeature -filename publishingSite\feature.xml -url http://sitecollectionurl -force
stsadm -o activatefeature -filename publishingweb\feature.xml -url http://sitecollectionurl -force
stsadm -o activatefeature -filename publishinglayouts\feature.xml -url http://sitecollectionurl -force
stsadm -o activatefeature -filename navigation\feature.xml -url http://sitecollectionurl -force
1) Clicking on Activate button in feature gallery and
2) By using stsadm commands.
To activate publishing infrastructure feature through commands, use the below commands:
stsadm -o activatefeature -filename publishingresources\feature.xml -url http://sitecollectionurl -force
stsadm -o activatefeature -filename publishingSite\feature.xml -url http://sitecollectionurl -force
stsadm -o activatefeature -filename publishingweb\feature.xml -url http://sitecollectionurl -force
stsadm -o activatefeature -filename publishinglayouts\feature.xml -url http://sitecollectionurl -force
stsadm -o activatefeature -filename navigation\feature.xml -url http://sitecollectionurl -force