Another quick blog post for you guys. There seems to be some confusion out there even among those who claim to be experts in SharePoint. I was told as late as yesterday that you cannot create a sub-site for a Publishing Site that is not a Publishing Site. I knew this to be incorrect from conversations with other individuals but had never actually sat down and figured it out. So, @LoriGowin and I spent 15 minutes on this yesterday to prove it could actually be done.
The reason for this myth is (and you’ve probably run into this before) if you create a Publishing site in SharePoint and then try to create a new site IN SharePoint for that publishing site, the only template you are given as an option is a Publishing template, and no matter what you try you can’t seem to get that list of templates to include anything other than Publishing templates!
If ONLY there was some other way to create sub-sites in SharePoint… oh wait… there is! Your handy dandy friend STSADM.
In order to get around this pesky issue in SharePoint use the “createweb” option in STSADM and specify the site template you would like to use. For example:
stsadm.exe -o createweb -url http://path-to-publishing-site/subsite-name -sitetemplate -title
That’s all there is to it. Oh… what are the template names you can use? Glad you asked. I found a great post from Dirk Van den Berghe listing out the template names: Site Template identifiers for use with STSADM Thanks for the post Dirk!
Still need a more solid example? Okay.. here is the above STSADM command creating a site using the blog template:
stsadm.exe -o createweb -url http://path-to-publishing-site/subsite-name -sitetemplate BLOG#0 -title MyBlog
There you have it. It CAN be done, and it’s really painless, and now you know where to go when you forget how to do it. Enjoy!