"Save site as template" option and the publishing feature

A common question I receive is the following:

I have tried to save my site as a template using "Site Action" – "Save site as template" but this option is not available as soon as I enable the publishing feature. After some tries I managed to save the site as a template my adding "_layouts/savetmpl.aspx" behind the site URL. But after creating a site based on this template the new site does not behave correct. How can I fix this?

Unfortunatelly the answer for this question is: saving publishing enabled sites as a template is not supported and it does not work. You cannot use this option to create new sites. Instead you should create site definitions (..\web server extensions\12\template\SiteTemplates) and provision the new site based on such a site definition.

Also be aware that deactivating the publishing feature and creating a template of the site will not lead to a supported template! The problem is that the template would still contain all the artefacts of a publishing site like Pages library and various different properties. Creating a template of a site which previously had the publishing feature activated is unsupported in the same way as creating a template from a site which has the publishing feature activated.

Update April 24th, 2008: The same statement applies if you save the template from SharePoint Designer. Also not supported.

Update June 8th, 2011: The same statements also apply to SharePoint 2010.

Update February 26th, 2014: The same statements also apply fo SharePoint 2013 and SharePoint Online

Update April 1st, 2015: See here: KB 2492356 

45 Comments


  1. So if it is "supported" why can you save the Site as Template using SharePoint Designer. We have 100 of sites with publishing features created from a save as template and it is working with no issue

    Reply

  2. Hi

    It should be supported because you can save site as template via SharePoint Designer that open the correct URL without change the URL manual. MS should support it!!! Actually the site behave as expected after you refresh it and even you get at the first time "Error" in the menu in the next time you enter the site everything fine.

    Meron.  

    Reply

  3. Actually it works but you have to make sure that everything every single file published before saving it as template 🙂

    Reply

  4. I’ve used this method many times without problems. And I agree with Daniel, if it is available in SharePoint Designer, how can you state that it is unsupported? Can you please post a link to the official M$ policy regarding this?

    Reply

  5. I came across this when trying to save as site as a template the other day – the option didn't exist

    Reply

  6. Hello,

    The fact that sharepoint designer allows you make a template of a site having the publishing feature turned on is indeed incoherent with what the UI does but Sharepoint Designer does nothing else than calling the URL which you could do using your browser…..

    It doesn’t fix the problems however because you can run in the following trouble:

    – Create a template of a site having publishing turned on (either using SD either by typing the URL manually)

    – Create a new site using the template you’ve just created

    – Make a new template of this site now….

    – Create a new site of this template, you’ll get errors….

    Reply

  7. Today we will look 3 options available for the modification of Site Master Pages. They include SP Designer, Site Template and File System options. …

    Reply

  8. Thanks for the information Stefan, if you get some spare time I am interested in understanding why saving as customized templates is not supported in the publishing environment.

    We want to make some simple changes to a blog site (relocate web parts on the page) and use that as a template. Seems there are some disadvantages in choosing to do this via a site definition http://msdn.microsoft.com/en-us/library/aa979683.aspx

    Thanks a lot

    Tim

    Reply

  9. Hi Timbo,

    internal testing showed a couple of problems when using save as a template with the publishing feature so it was decided not to support this.

    Cheers,

    Stefan

    Reply

  10. Hi Guys i am also doing the same work but i am getting the Error Tab as Meron said… but i am unable to get rid of that… can any one help me out how can i do that without any error… i have published every thing. Thanks

    Reply

  11. Hi Hammad,

    using this method is unsupported. Don’t expect that it will work. Never create a publishing site from a saved template.

    Cheers,

    Stefan

    Reply

  12. Stefan,

    Very useful information.  What I am trying to do is develop a reporting portal that lives on a publishing site.  As the standard report templates are not visible once you’ve selected a top level publishing site, I’m wondering how you would handle this.

    Reply

  13. You can add other site templates to your site collection from the settings page.

    Reply

  14. I’ve tried to save the Site as template with browsing and using the /_layouts/savetmpl.aspx screen (like Meron said) and it works fine.

    Reply

  15. Hi Tal,

    yes it works – but it is unsupported.

    The reason is that sites created from such a saved template do not work correct which leads to an unsupported target database.

    Cheers,

    Stefan

    Reply

    1. What does unsupported mean in SPO?

      Reply

      1. Hi Anas,
        it means the same as in any other product.
        Cheers,
        Stefan

        Reply

  16. I tried using the url and the sites don’t work.  However, we have MOSS and I have tried using Site Manager to ‘Copy’ the site.  This seems to work, but I’ve found that the styles on the copied site do not work.  Any suggestions for this approach?  

    We really don’t have the time to invest in learning how to create a custom site definition.

    Reply

  17. Hi Joyce,

    using the standard page layouts and master pages I did not see a problem with styles when using copy in Site Manager.

    Do you used customized page layouts or master pages? If yes, there might be a problem in the implementation of these files.

    Cheers,

    Stefan

    Reply

  18. Can someone tell us exactlly what the issues is when create a publishing site from a saved template? How many errors and what is it?

    Reply

  19. Hi Stephen,

    such a list ist not available to the public for two reasons:

    1) the scenario is unsupported and we do not provide details about things that can go wrong for unsupported scenario as this could encourage people to use the unsupported scenario.

    2) a complete list does not exist as no complete tests have been done for this unsupported scenario. During product release several limitations have been found which led to the decision that this scenario is unsupported and after this decision all further tests have been stopped.

    Cheers,

    Stefan

    Reply

  20. Has this been fixed in SharePoint 2010?

    Reply

  21. Hi Peter,

    no change in SP2010.

    Cheers,

    Stefan

    Reply

  22. Stefan, do I use the STSADM -o EXPORT / STSADM -o IMPORT  commands instead to copy a site?

    Reply

  23. I created a publishing site from a saved template and am running into problems.  When I try to modify the publishing pages in SharePoint designer, the Design view is totally blank … only the code view is populated.  I would have expected to have to "detach from page layout" before editing in the designer, but that option was not available on the right click of the file name.  So the publishing site seems to work fine, but it does not seem to be modifiable in the usual manner.

    Reply

  24. Hi Jillian, as I oulined: using a saved template from a publishing site is unsupported. To get back to a supported environment you need to delete the site and create it manually or using a site definition template.

    Reply

  25. Hi Peter, yes you could use export/import. But you cannot export a root site into a subsite or vice versa.

    Reply

  26. This says that Microsoft doesn't support this because it leads to an unsupported target database.  How does this effect the target database?  And if I turn off publishing make the template and then once the template is use and I turn publishing back on will that cause any issues?

    Also we aren't actually using the publishing pages only using this for the extra menu items, the ability to use the navigation area a little easier and then for the ability to get the breadcrumb trail at the top left hand corner.  Will that effect the database since it is a regular sharepoint only really using those three features of publishing?

    Reply

  27. Hi Angelita,

    the information about how it affects the DB is not available outside Microsoft to ensure that people are not encouraged to accept the limitations.

    if you disable the publishing feature and delete all content that belongs to the Publishing feature (pages library, publishing image and publishing document library and several properties in the property bag) before saving as template you would be fine.

    If you keep any content related to the publishing feature – even if it is diabled – it will be affected and unsupported.

    Cehers,

    Reply

  28. Why is it that you can't save a publishing site as a site template? The only issues that I've found in SP 2010 is that the home page(default.aspx) page is not present when you view the welcome page url property.

    Reply

  29. Hi Brandon,

    even with SP2010 there are various different issues.

    They are not documeted as using this method is unsupported.

    Cheers,

    Stefan

    Reply

  30. hi stefen,

    i I've tried to save the Site as template with browsing and using the /_layouts/savetmpl.aspx screen (like Meron said) and it works fine., but , when tried to create sitecollection with this template, i getting error like " the template you have choosen is invalid or can'b found ,

    Reply

  31. Hi Sha,

    if the publishing feature had been activated on this site it is unsupported to use this option. The option is hidden for a good reason – because the result will be a broken site.

    Cheers,

    Stefan

    Reply

  32. Hi Stefan,

    Could you please tell me is this applicable for MOSS 2010 also. If yes is there a KB available for the same, please do share if yes.

    Regards

    Mohan Raj

    Reply

  33. Hi Raj,

    it is also applicable for 2010.

    I adjusted the post.

    Cheers,

    Stefan

    Reply

  34. Hi Stefan,

    Thnak you for your information.

    I need clarification on Publishing Infrastructure in SharePoint 2010.

    I have created a site collection using document center template and configured the site but I have enabled only Publishing Infrastructure feature at site collection not Publishing server feature at site level.That's why I was able to save the site as template using "Save Site as template" under site actions.Now I want to import solution file in to Visual Studio to change the scope from site to farm to deploy at farm level to create new site collections.

    Here my question is:

    Is it possible to create new site collections using the publishing infrastructure feature enabled(not enabled publishing server feature at site level) site template?

    Please help me out in this regard.

    Thank you.

    Reply

  35. Hi Anonymous,

    that should be ok.

    Cheers,

    Stefan

    Reply

  36. Hi Anonymous, just to add: as long as you are not saving the root site in the site collection as a template.

    Reply

  37. Hi Stefan,

    Is there no workaround for this. We create sites/sub sites using this template. Now the user wants the template with some lists to be added so that next time he does not have to recreate the lists. Through Code its possible to create a separate template with lists but the end user does not want to keep doing it. Any workaround to get it done through the UI?

    Reply

  38. Hi Kittu,

    absolutly no workaround it is unsupported to use templates from site which previously had the publishing feature enabled.

    It will break lots of things and the only solution then is to delete the site with all containing content and all subsites.

    Cheers,

    Stefan

    Reply

  39. Stefan

    It seems inconsistent for MSFT to take such a not-supported-period approach to such a strategic feature of SharePoint.

    Cutting to the chase, if a client goes to the additional effort to create a Site Definition and save it to the 12-hive, are there any issues with that approach?

    Meaning, issues as encountered by savetmpl.aspx.

    Reply

  40. Stefan noting the issue with site templates with publisher turned on. we are about to roll out SharePoint online across a large workspace and want to template libraries and lists with publisher on. will this still be a case being of unsupported?

    Reply

    1. I assume you meant “publishing feature”. The limitation is for site templates – not for list templates.
      As long as you mean templates for normal document libraries or lists you are fine.
      Just stay away from pages library.
      Cheers,
      Stefan

      Reply

Leave a Reply

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

This site uses Akismet to reduce spam. Learn how your comment data is processed.