Missing Save Site as Template Option in SharePoint 2013
If you are trying to save a site in SharePoint Server 2013 and you don’t see the option for “Save site as template” it is likely because the site has the publishing feature turned on. Back in November 2010 I wrote this article Missing Save Site as Template Option in SharePoint 2010. In that article I discussed two options to save a publishing site as a template. Well, I have some bad news, some good news, some bad news and finally some good news.
The Bad, the Good, the Bad, and the Good News
Unfortunately, the trick (add _layouts/_savetmpl.aspx at the end of the site URL) worked in SharePoint 2010 but it doesn’t work in SharePoint 2013. That’s the bad news.
The good news is that there is a solution available in SharePoint 2013 which will enable the SharePoint 2010 trick to work in SharePoint 2013.
The bad news is that Microsoft doesn’t support saving a publishing site as a template (see KB article 2492356). According to Microsoft “SharePoint does not support Save Site as Template option with the Publishing features turned on. The supported method to create templates for publishing sites is to use a site definition template and using a feature XML.” By the way the KB article 2492356 applies to MOSS 2007, SharePoint 2010 and SharePoint 2013.
The good news is that Microsoft has a supported workaround in another KB article 925189. Why didn’t they put the supported workaround in the KB article 2492356? That’s a good question and I don’t know the answer.
Here’s the problem and all the workarounds. Notice that I am not calling it a solution because all of these are workarounds for a known problem.
You are unable to save a publishing site as a template in SharePoint 2013.
WARNING! Do not deactivate publishing feature just to save the site as a template because you will be asking for trouble. The template that you create this way is likely to have lots of problems because the publishing sites have certain properties, and a special Pages library, all of which is likely to mess up the new site that you create with the template. This is true for all versions of SharePoint: MOSS 2007, SharePoint 2010, SharePoint 2013 and SharePoint Online.
There are at least three options that you can use to save a publishing site as a template. The first two workarounds are not officially supported by Microsoft, even though the first one is documented by a Microsoft employee in a Microsoft MSDN blog.
Option 1 (Not supported by Microsoft)
Use PowerShell to update the property called SaveSiteAsTemplateEnabled. Here’s the PowerShell script that will set the value of the property to true and allow you to use the _layouts/15/savetmpl.aspx at the end of the sit URL. Replace http:/www.contoso.com with your site’s URL in the following script.
- Run the following PowerShell script. I prefer to use PowerShell ISE (64-bit).
$web = Get-SPWeb http://www.contoso.com/training
$web.AllProperties[“SaveSiteAsTemplateEnabled”] = “true”
- Go to your site and use the following syntax to save the publishing site as a template.
For example, http://www.contoso.com/training/_layouts/15/savetmpl.aspx, where training is a subsite of contoso.com.
- Keep in mind the option to save the site as a template will not be available in the GUI in the Site Settings -> Site Actions. You must use the above step #2 to save the site as a template.
Option 2 (Not supported by Microsoft)
If you are not familiar with PowerShell or prefer to use a different method then use SharePoint Designer 2013 to make the same change the property SaveSiteAsTemplateEnabled.
- Open the publishing site in SharePoint Designer 2013.
- Click the Site Settings icon on the ribbon.
- Modify the parameter SaveSiteAsTemplateEnabled from the default value of false to true.
- Click OK and close SharePoint Designer 2013.
- Go to the publishing site and in the URL add _layouts/15/savetmpl.aspx at the end of the site URL, as described in Option 1, Step #2 above.
- Keep in mind the option to save the site as a template will not be available in the GUI in the Site Settings -> Site Actions. You must use the above step #5 to save the site as a template.
Option 3 (Supported by Microsoft)
The following workaround is supported by Microsoft and is documented in the KB article 925189.
- Open the Feature.xml file of the Publishing feature in a text editor like Notepad. The file is located under C:\Program Files\Common Files\Microsoft Shared\Web Server Extensions\15\TEMPLATE\FEATURES\Publishing.
For SharePoint 2010 the path is C:\Program Files\Common Files\Microsoft Shared\Web Server Extensions\14\TEMPLATE\FEATURES\Publishing
For MOSS 2007 the path is C:\Program Files\Common Files\Microsoft Shared\Web Server Extensions\12\TEMPLATE\FEATURES\Publishing
- Add the following line to the Feature.xml file:
- Use Notepad to create a new file in the same directory called MyHideAction.xml. Make sure that the file extension is XML and not TXT. Add the following content to the
<HideCustomAction Id=”HideSaveAsTemplate” HideActionId=”SaveAsTemplate”
GroupId=”Customization” Location=”Microsoft.SharePoint.SiteSettings” />”
- Save the file.
Copyright © 2015 SeattlePro Enterprises, LLC. All rights reserved.