SharePoint: Save Publishing Site as Template in MOSS 2007

Seems that Microsoft forgot to add a link to “Save site as Template” for Publishing sites in MOSS 2007, and it appears the problem is not addressed in SP1, either. Makes me wonder if the lack-of-link was intentional.

Nevertheless, in order to save any Publishing Site as a template, you must manually append the site template address “/_layouts/savetmpl.aspx” to the site URL. So for instance, if your site is http://intranet/offices/sandiego, you can save the template by manually browsing to http://intranet/offices/sandiego/_layouts/savetmpl.aspx

Yeahh.

Chrissy is a PowerShell MVP who has worked in IT for nearly 20 years, and currently serves as a Sr. Database Engineer in Belgium. Always an avid scripter, she attended the Monad session at Microsoft’s Professional Developers Conference in Los Angeles back in 2005 and has worked and played with PowerShell ever since. Chrissy is currently pursuing an MS in Systems Engineering at Regis University and helps maintain RealCajunRecipes.com in her spare time. She holds a number of certifications, including those relating to SQL Server, SuSE Linux, SharePoint and network security. She recently became co-lead of the SQL PASS PowerShell Virtual Chapter. You can follow her on Twitter at @cl.

Posted in SharePoint
11 comments on “SharePoint: Save Publishing Site as Template in MOSS 2007
  1. Neil Wells-West says:

    Hi. This is incorrect. I am consultant with a MS gold partner and the reason you can’t/shouldn’t save sites with publishing features enabled is because content types are not saved with site templates. What do publishing pages rely on? That’s right – page and page layout content types. So if you create a custom page layout content type for your publishing site and want to be able to cerate pages based on that custom content type in otehr publishing sites you will either need to recreate the custom content type or write a feature to deploy it to all sites that require it. Simple really. MS hides links for good reasons….

  2. Chrissy says:

    Thanks for the tip, Neil! I wondered if there was a reason.

  3. Shail says:

    Guys,

    I was using Sharepoint 2003 and now just got into MOSS. Basically, I have a task where we create a site.. say for eg: Department and then add some inbuilt webparts and some custom web parts.. Now I want to use this site as template site for 10 other departments. In SP 2003, I saved the site as template and used it to create other sites.. Did anything change in MOSS or is there any other better way of achieving this?

    Thanks in advance for your response!

  4. Mina says:

    Shail,
    How did you work on creating these 10 other departments… What was the most efficient way?
    Thanks in advance.

  5. Dolly says:

    Hmmm, I’ve got a problem with Site Templates but it doesn’t appear that it’s due to the following, “content types are not saved with site templates”, as Neil says. I use the link “/_layouts/savetmpl.aspx” to save the template, then upload it and create a site with it and all seems fine. Our custom content types are all there.

    When I attempt to create a site within my new site, however, the site template is *not* available. I can ‘Reset all subsite to inherit these preferred subsite template settings’ and it fixes things but I shouldn’t have to do this. Any ideas anyone?

  6. Tom says:

    On the surface, this appeared to work jsut fine. But one thing that did not come over automatically was the search visibility. For me, my search visibility setting did not come over. Rahter, the default “Do not index ASPX pages if this site contains fine-grained permissions”. I had to set this manually.

    While I have a feature that will set this to “Always Index ASPX pages” I was wondering if anyone knew why the Site Collection templte did not pick this up.

    Thanks

    Tom

  7. I wouldn’t exactly recommend this as not only is it not supported (there’s a reason the product team took the Save Site As Template out for Publishing sites), I’ve found it to be very problematic.

  8. Ben says:

    This leaves us with a bit of a problem. Now if I want my users to duplicate sites over and over again from a clean beginning I need to hire a developer – I’ve not been able to find a way to easily roll up an existing site into a solution off the shelf – and with the Sharepoint Gold rush in full swing developers are tough to come buy…

    Meanwhile frustrated users Google the problem, find the templates secret page and away they go :-)

    How does everyone else deal with this?

  9. Chris says:

    There is another way – using the content and structure options under site settings you can copy the site, and paste it again. Then all you need to do under it is to change the title and description (as well as the URL) in site settings

  10. Trevor says:

    As AC and others have pointed out, it’s not an option in the GUI for a reason… I gave the workaround to Chrissy mentioned in the blog of another another Sharepoint MVP, Shane Young. (http://msmvps.com/blogs/shane/archive/2006/07/29/moss-2007-save-site-as-a-template-missing.aspx)

    To defend my action, I must state that the engagement I was contracted to perform was a 3-day quick ramp-up, after which we would not have the ability to work closely together, and we did not have time to get into customizing site definition XML… Although, now that Andrew’s book is available with examples contained therein, I should follow up and recommend this approach as a better practice.

    http://www.andrewconnell.com/blog/archive/2008/03/19/WROX-Pro-MOSS-WCM-2007-Book-Its-Finally-Finished-available.aspx

    Chapter 5 specifically gets into customizing a publishing site definition… The book is worth it’s weight in gold.

  11. Chrissy says:

    No need to defend, IMO! I asked you specifically for the link and you simply (and effectively) answered my question.

Leave a Reply

Your email address will not be published. Required fields are marked *

*