Sharepoint - Save site as template in SharePoint Online
Although this option is not supported by Microsoft it still works very well in some specific scenarios. To Save the site as a template you can follow this steps.
- Open the site with SharePoint Designer
- In the ribbon go to Site Options
- Locate the option SaveSiteAsTemplateEnabled and modify the value to true
- Since the site template is disabled in the Publishing sites the option Save Site as Template is not available in the Site Settings you will need to navigate to the page directly: http://yourdomain.sharepoint.com/_layouts/savetmpl.aspx Provide all the details and click OK after a couple of minutes you will have the WSP site template generated
Note: If you have apps downloaded from the store they could prevent you to save the site as a template if you are facing this scenario you will need to uninstall the apps first.
Create a site based on the template will require a similar environment this means that you will need to have the same features installed and activated in the site collection where you want to install the template.
In this article you can find more information about how to activate the features. Save Publishing Site as template
If you have custom page layouts applied to your site site you might loose the access to the pages with them applied after creating the site based on the template.
If you face this issue you can follow this article to fix it Fix publishing pages with custom page layouts created from template
This issue most frequently occurs because
the Community Sites or the SharePoint Server Publishing feature is currently enabled or was previously enabled for the affected site.
Also, in SharePoint Online, if you disabled scripting capabilities for the affected site in Center Admin, this also removes the
Save site as template
option
For more details check
Save site as template option isn't available in SharePoint Online in Office 365 or SharePoint Server 2013
How to save site as template for publishing sites in SharePoint (not supported)