SharePoint Online allows you to create site templates to quickly spin up new sites with the same structure, features, and content. However, with modern SharePoint sites, the process and availability of this feature have changed compared to classic sites.
To save a SharePoint site as a template, the process depends on whether you are using classic or modern SharePoint sites, and whether you are on SharePoint Online or SharePoint Server. Microsoft has made changes in recent years, especially for SharePoint Online, so it’s important to follow the latest guidance.
Save A SharePoint Site As A Template (Modern Site)
For modern SharePoint Online sites, Microsoft has deprecated the “Save site as template” option in the UI. You can follow my tutorials below:
- Export and Import SharePoint Online Site as Template using PowerShell
- How To Create Custom Site Template In SharePoint Online?
SharePoint Save Site as Template Missing
The “Save site as template” option is often missing for modern sites due to the following reasons:
- The site is a modern team site connected to a Microsoft 365 Group.
- The SharePoint Server Publishing feature was activated at any time.
- Microsoft has disabled this feature for modern sites for compatibility reasons.
But you can use PowerShell to enable this option. But it is not recommended by Microsoft to do so.
You can enable the option using PowerShell, but this is not officially supported and may cause issues:
# Connect to SharePoint Online
Connect-SPOService -Url https://yourtenant-admin.sharepoint.com
# Enable custom script on the site
Set-SPOSite -Identity https://yourtenant.sharepoint.com/sites/yoursite -DenyAddAndCustomizePages 0You may need to wait 24 hours for this change to take effect.
Check out Change SharePoint Site Logo and Thumbnail
Save SharePoint Site as Template
You can follow the steps below to save the SharePoint site as a template. This will work for the classic sites, both in SharePoint Online and SharePoint on-premises versions.
- To create a site template, open your SharePoint site, click on the gear icon, and then click on Site settings, like below:

- On the Site Settings page, click “Save site as template,” located under the Site Actions section.

- Then it will open the Save as Template page, give a file name, template name, description, as well as if you want to include the content, check the checkbox “include content” as shown in the figure below:

- Once the operation is completed successfully, it will display a successful message. The template will be saved in the solution gallery of the site collection.

- Now, if you visit the solution gallery, you can see that the template must be saved and activated there. It will display like below: (To visit the solution gallery from the site settings page, click on Solutions, which is under Web Designer Galleries)

This is how to save a SharePoint site as a template.
Check out Change SharePoint Site URL and Name
Create a Sub Site using SharePoint Custom Site Template
Once we save the SharePoint site as a template, we can create a site or subsite using the custom SharePoint template.
- Now, if you go to the Site Contents page of the SharePoint site and try to create a new subsite, you can see the template appears under the Custom tab.

- Once you create the site using the template, the new site will be created based on the same template. As you can see in the example, the new site features the logo, which was also included in the template, as well as an Employee list, which was present in the existing template. The new site looks like this:

This is how to create a new site from the SharePoint site template.
SharePoint Save Site as Template URL
We can also access the SharePoint save site template URL directly.
<You SharePoint Site URL>/_layouts/savetmpl.aspx
or
<You SharePoint Site URL>/_layouts/15/savetmpl.aspx
Conclusion
For modern SharePoint Online sites, the traditional “Save site as template” feature is usually unavailable. Microsoft encourages using site templates (site designs) for consistent site creation. If you need to replicate site content and structure, consider saving individual pages as templates or manually recreating the site.
If you need the classic template feature and are comfortable with potential risks, you can enable it with PowerShell, but this is not recommended for production environments. For most users, using site templates is the best practice moving forward.
In this tutorial, I explained how to work with saving a SharePoint site as a template.
You may also like the following tutorials:
- Redirect SharePoint Site To New URL
- SharePoint Online Site Date Format
- How to Share a SharePoint Online Site
- How to Create a Parallel Approval in Power Automate?

After working for more than 18 years in Microsoft technologies like SharePoint, Microsoft 365, and Power Platform (Power Apps, Power Automate, and Power BI), I thought will share my SharePoint expertise knowledge with the world. Our audiences are from the United States, Canada, the United Kingdom, Australia, New Zealand, etc. For my expertise knowledge and SharePoint tutorials, Microsoft has been awarded a Microsoft SharePoint MVP (12 times). I have also worked in companies like HP, TCS, KPIT, etc.
When you save a site as template, how can you ensure subsites are also saved?