{"id":5354,"date":"2015-01-20T08:20:25","date_gmt":"2015-01-20T16:20:25","guid":{"rendered":"https:\/\/www.zubairalexander.com\/stage\/?p=5354"},"modified":"2016-05-27T12:52:01","modified_gmt":"2016-05-27T19:52:01","slug":"missing-save-site-as-template-option-in-sharepoint-2013","status":"publish","type":"post","link":"https:\/\/www.zubairalexander.com\/blog\/missing-save-site-as-template-option-in-sharepoint-2013\/","title":{"rendered":"Missing Save Site as Template Option in SharePoint 2013"},"content":{"rendered":"<p>If you are trying to save a site in SharePoint Server 2013 and you don\u2019t see the option for \u201cSave site as template\u201d it is likely because the site has the publishing feature turned on. Back in November 2010 I wrote this article <a href=\"https:\/\/www.zubairalexander.com\/blog\/missing-save-site-as-template-option-in-sharepoint-2010\">Missing Save Site as Template Option in SharePoint 2010<\/a>. 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.<\/p>\n<p><strong>The Bad, the Good, the Bad, and the Good News<\/strong><\/p>\n<p style=\"padding-left: 30px;\"><strong>Bad News<\/strong><\/p>\n<p style=\"padding-left: 60px;\">Unfortunately, the trick (add <strong>_layouts\/_savetmpl.aspx<\/strong> at the end of the site URL) worked in SharePoint 2010 but it doesn&#8217;t work in SharePoint 2013. That&#8217;s the bad news.<\/p>\n<p style=\"padding-left: 30px;\"><strong>Good News<\/strong><\/p>\n<p style=\"padding-left: 60px;\">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.<\/p>\n<p style=\"padding-left: 30px;\"><strong>Bad News<\/strong><\/p>\n<p style=\"padding-left: 60px;\">The bad news is that Microsoft doesn&#8217;t support saving a publishing site as a template (see <a href=\"http:\/\/support.microsoft.com\/kb\/2492356\">KB article 2492356<\/a>). According to Microsoft &#8220;SharePoint does not support <b>Save Site as Template<\/b>\u00a0option with the Publishing features turned on. The supported method to create templates for publishing sites\u00a0is\u00a0to use a site definition template and using a feature XML.&#8221; By the way the KB article 2492356 applies to MOSS 2007, SharePoint 2010 and SharePoint 2013.<\/p>\n<p style=\"padding-left: 30px;\"><strong>Good News<\/strong><\/p>\n<p style=\"padding-left: 60px;\">The good news is that Microsoft has a supported workaround in another <a href=\"http:\/\/support.microsoft.com\/kb\/925189\">KB article 925189<\/a>. Why didn&#8217;t they put the supported workaround in the <a href=\"http:\/\/support.microsoft.com\/kb\/2492356\">KB article 2492356<\/a>? That&#8217;s a good question and I don&#8217;t know the answer.<\/p>\n<p>Here&#8217;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.<\/p>\n<p><strong>Problem<\/strong><\/p>\n<p style=\"padding-left: 30px;\">You are unable to save a publishing site as a template in SharePoint 2013.<\/p>\n<p><span style=\"color: #ff0000;\"><strong>WARNING<\/strong><\/span>! <em>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.<\/em><\/p>\n<p><strong>Workarounds<\/strong><\/p>\n<p>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 <a href=\"http:\/\/blogs.msdn.com\/b\/how24\/archive\/2013\/06\/13\/save-publishing-site-as-a-template.aspx\">Microsoft MSDN<\/a> blog.<\/p>\n<p style=\"padding-left: 30px;\"><strong>Option 1<\/strong> (Not supported by Microsoft)<strong><br \/>\n<\/strong><\/p>\n<p style=\"padding-left: 30px;\">Use PowerShell to update the property called <strong>SaveSiteAsTemplateEnabled<\/strong>. Here&#8217;s the PowerShell script that will set the value of the property to true and allow you to use the\u00a0<strong>_layouts\/15\/savetmpl.aspx<\/strong> at the end of the sit URL. Replace <em>http:\/www.contoso.com<\/em> with your site&#8217;s URL in the following script.<\/p>\n<ol>\n<li>Run the following PowerShell script. I prefer to use PowerShell ISE (64-bit).<br \/>\n$web = Get-SPWeb <span style=\"color: #ff0000;\">http:\/\/www.contoso.com\/training<\/span><br \/>\n$web.AllProperties[&#8220;SaveSiteAsTemplateEnabled&#8221;] = &#8220;true&#8221;<br \/>\n$web.Update()<\/li>\n<li>Go to your site and use the following syntax to save the publishing site as a template.<br \/>\n<em>http:\/\/site\/subsite\/_layouts\/15\/savetmpl.aspx<\/em><br \/>\nFor example, http:\/\/www.contoso.com\/training\/<strong>_layouts\/15\/savetmpl.aspx<\/strong>, where training is a subsite of contoso.com.<\/li>\n<li>Keep in mind the option to save the site as a template will not be available in the GUI in the Site Settings -&gt; Site Actions. You must use the above step #2 to save the site as a template.<\/li>\n<\/ol>\n<p style=\"padding-left: 30px;\"><strong>Option 2<\/strong> (Not supported by Microsoft)<strong><br \/>\n<\/strong><\/p>\n<p style=\"padding-left: 30px;\">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.<\/p>\n<ol>\n<li>Open the publishing site in SharePoint Designer 2013.<\/li>\n<li>Click the Site Settings icon on the ribbon.<br \/>\n<a href=\"https:\/\/www.zubairalexander.com\/blog\/wp-content\/uploads\/2015\/01\/SiteOptions_in_SPD.png\"><img decoding=\"async\" class=\"alignnone size-medium wp-image-5355\" src=\"https:\/\/www.zubairalexander.com\/blog\/wp-content\/uploads\/2015\/01\/SiteOptions_in_SPD-300x30.png\" alt=\"SiteOptions_in_SPD\" width=\"300\" height=\"30\" srcset=\"https:\/\/www.zubairalexander.com\/blog\/wp-content\/uploads\/2015\/01\/SiteOptions_in_SPD-300x30.png 300w, https:\/\/www.zubairalexander.com\/blog\/wp-content\/uploads\/2015\/01\/SiteOptions_in_SPD-768x77.png 768w, https:\/\/www.zubairalexander.com\/blog\/wp-content\/uploads\/2015\/01\/SiteOptions_in_SPD.png 935w\" sizes=\"(max-width: 300px) 100vw, 300px\" \/><\/a><\/li>\n<li>Modify the parameter SaveSiteAsTemplateEnabled from the default value of false to <strong>true<\/strong>.<br \/>\n<a href=\"https:\/\/www.zubairalexander.com\/blog\/wp-content\/uploads\/2015\/01\/Set-SaveSiteAsTemplateEnabled-to-true.png\"><img decoding=\"async\" class=\"alignnone size-medium wp-image-5356\" src=\"https:\/\/www.zubairalexander.com\/blog\/wp-content\/uploads\/2015\/01\/Set-SaveSiteAsTemplateEnabled-to-true-300x263.png\" alt=\"Set SaveSiteAsTemplateEnabled to true\" width=\"300\" height=\"263\" srcset=\"https:\/\/www.zubairalexander.com\/blog\/wp-content\/uploads\/2015\/01\/Set-SaveSiteAsTemplateEnabled-to-true-300x263.png 300w, https:\/\/www.zubairalexander.com\/blog\/wp-content\/uploads\/2015\/01\/Set-SaveSiteAsTemplateEnabled-to-true.png 421w\" sizes=\"(max-width: 300px) 100vw, 300px\" \/><\/a><\/li>\n<li>Click OK and close SharePoint Designer 2013.<\/li>\n<li>Go to the publishing site and in the URL add\u00a0<strong>_layouts\/15\/savetmpl.aspx<\/strong> at the end of the site URL, as described in Option 1, Step #2 above.<\/li>\n<li>Keep in mind the option to save the site as a template will not be available in the GUI in the Site Settings -&gt; Site Actions. You must use the above step #5 to save the site as a template.<\/li>\n<\/ol>\n<p style=\"padding-left: 30px;\"><strong>Option 3 (Supported by Microsoft)<\/strong><\/p>\n<p>The following workaround is supported by Microsoft and is documented in the <a href=\"http:\/\/support.microsoft.com\/kb\/925189\">KB article 925189<\/a>.<\/p>\n<ol>\n<li>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.<br \/>\nFor SharePoint 2010 the path is C:\\Program Files\\Common Files\\Microsoft Shared\\Web Server Extensions\\<strong>14<\/strong>\\TEMPLATE\\FEATURES\\Publishing<br \/>\nFor MOSS 2007 the path is C:\\Program Files\\Common Files\\Microsoft Shared\\Web Server Extensions\\<strong>12<\/strong>\\TEMPLATE\\FEATURES\\Publishing<\/li>\n<li>Add the following line to the Feature.xml file:<br \/>\n&lt;ElementManifest Location=&#8221;MyHideAction.xml&#8221;\/&gt;<br \/>\n<a href=\"https:\/\/www.zubairalexander.com\/blog\/wp-content\/uploads\/2015\/01\/MyHideAction-entry.png\"><img decoding=\"async\" class=\"alignnone size-medium wp-image-5366\" src=\"https:\/\/www.zubairalexander.com\/blog\/wp-content\/uploads\/2015\/01\/MyHideAction-entry-300x210.png\" alt=\"MyHideAction entry\" width=\"300\" height=\"210\" srcset=\"https:\/\/www.zubairalexander.com\/blog\/wp-content\/uploads\/2015\/01\/MyHideAction-entry-300x210.png 300w, https:\/\/www.zubairalexander.com\/blog\/wp-content\/uploads\/2015\/01\/MyHideAction-entry.png 606w\" sizes=\"(max-width: 300px) 100vw, 300px\" \/><\/a><\/li>\n<li>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<br \/>\nMyHideAction.xml file.<br \/>\n<span style=\"color: #339966;\">&lt;Elements xmlns=&#8221;http:\/\/schemas.microsoft.com\/sharepoint\/&#8221;&gt;<\/span><br \/>\n<span style=\"color: #339966;\">\u00a0&lt;HideCustomAction Id=&#8221;HideSaveAsTemplate&#8221; HideActionId=&#8221;SaveAsTemplate&#8221; <\/span><br \/>\n<span style=\"color: #339966;\">\u00a0GroupId=&#8221;Customization&#8221; Location=&#8221;Microsoft.SharePoint.SiteSettings&#8221; \/&gt;&#8221;<\/span><br \/>\n<span style=\"color: #339966;\"><span style=\"color: #339966;\"><span style=\"color: #339966;\">&lt;\/Elements&gt;<\/span><\/span><\/span><a href=\"https:\/\/www.zubairalexander.com\/blog\/wp-content\/uploads\/2015\/01\/MyHideAction-XML-file.png\"><img decoding=\"async\" class=\"alignnone size-medium wp-image-5367\" src=\"https:\/\/www.zubairalexander.com\/blog\/wp-content\/uploads\/2015\/01\/MyHideAction-XML-file-300x69.png\" alt=\"MyHideAction XML file\" width=\"300\" height=\"69\" srcset=\"https:\/\/www.zubairalexander.com\/blog\/wp-content\/uploads\/2015\/01\/MyHideAction-XML-file-300x69.png 300w, https:\/\/www.zubairalexander.com\/blog\/wp-content\/uploads\/2015\/01\/MyHideAction-XML-file.png 613w\" sizes=\"(max-width: 300px) 100vw, 300px\" \/><\/a><\/li>\n<li>Save the file.<\/li>\n<\/ol>\n<hr \/>\n<p><span style=\"font-size: xx-small; font-family: Verdana;\">Copyright \u00a9 2015 SeattlePro Enterprises, LLC. All rights reserved.<\/span><\/p>\n","protected":false},"excerpt":{"rendered":"<p>If you are trying to save a site in SharePoint Server 2013 and you don\u2019t see the option for \u201cSave site as template\u201d 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 [&hellip;]<\/p>\n","protected":false},"author":7,"featured_media":5356,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_monsterinsights_skip_tracking":false,"_monsterinsights_sitenote_active":false,"_monsterinsights_sitenote_note":"","_monsterinsights_sitenote_category":0,"footnotes":""},"categories":[43,57,54,11],"tags":[],"class_list":["post-5354","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-articles","category-scripting","category-sharepoint","category-tips-tricks"],"aioseo_notices":[],"jetpack_featured_media_url":"https:\/\/www.zubairalexander.com\/blog\/wp-content\/uploads\/2015\/01\/Set-SaveSiteAsTemplateEnabled-to-true.png","_links":{"self":[{"href":"https:\/\/www.zubairalexander.com\/blog\/wp-json\/wp\/v2\/posts\/5354","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.zubairalexander.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.zubairalexander.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.zubairalexander.com\/blog\/wp-json\/wp\/v2\/users\/7"}],"replies":[{"embeddable":true,"href":"https:\/\/www.zubairalexander.com\/blog\/wp-json\/wp\/v2\/comments?post=5354"}],"version-history":[{"count":0,"href":"https:\/\/www.zubairalexander.com\/blog\/wp-json\/wp\/v2\/posts\/5354\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.zubairalexander.com\/blog\/wp-json\/wp\/v2\/media\/5356"}],"wp:attachment":[{"href":"https:\/\/www.zubairalexander.com\/blog\/wp-json\/wp\/v2\/media?parent=5354"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.zubairalexander.com\/blog\/wp-json\/wp\/v2\/categories?post=5354"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.zubairalexander.com\/blog\/wp-json\/wp\/v2\/tags?post=5354"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}