How to save the site as a template in SharePoint 2013?
The easiest way to create a standard template for your SharePoint sites is to create a site, Add-remove content, list, and libraries to it, and save the site as a template from Site Settings >> Save Site as a template. – Shortcut URL: “/_layouts/savetmpl.aspx”
Save Site as Template in SharePoint using PowerShell
You can save your site as template even with the publishing feature using the following PowerShell command
$WebURL = "http://your-site-collection-URL" #Get the Web Object $Web= Get-SPWeb $WebURL #Variables for Save site as template settings $TemplateName ="PMO Site Template" $TemplateTitle ="PMO Project Site Template" $TemplateDescription ="Site template for PMO project management portal" #Option to Save with content $SaveWithContent= 1 #0 otherwise #Save site as template programmatically with PowerShell $Web.SaveAsTemplate($TemplateName,$TemplateTitle,$TemplateDescription,$SaveWithContent)
Saved template will be available under site collection “Solutions” gallery. Once saved, you can import this WSP (it was .stp in SharePoint 2007 days!) file from the solution gallery into Visual Studio and customize it further. You can also upload the WSP file to other site collections to add this new site template.