Download a template - modern sites

Brass Contributor

Can anybody please share a how to on downloading my SharePoint site as a template?

 

Everytime I think I've got something useful, it turns out to be a classic template 

 

The Microsoft site isn't clear on how to do this, so a good third party tutorial would be idea.

 

Thanks

6 Replies

@Lee-Martin 

 

The functionality of saving a site as a template is not supported in SharePoint Online (modern sites). Please accept my sincere apologies about that. See Save, download, and upload a SharePoint site as a template | Microsoft Learn

 

However, I have been able to get how you can save the modern site (modern team site and communication site) as the site template, although I have not had the chance to test. You can by visiting /_layouts/savetmpl.aspx page. 

 

When you access /_layouts/savetmpl.aspx , access denied may occur. It occurs because the denyaddandcustomizepages of this site is true. DenyAddAndCustomizePages determines whether the Add And Customize Pages right is denied on the site collection. By default, the right is denied on the modern site collection.

 

We need to connect to SharePoint Online using PowerShell and set denyaddandcustomizepages of the site to false.

 

$adminUPN="<admin>@<tenant>.onmicrosoft.com"
$userCredential = Get-Credential -UserName $adminUPN -Message "Type the password."

Connect-SPOService -Url https://<tenant>-admin.sharepoint.com -Credential $userCredential
set-sposite https://<tenant>.sharepoint.com/sites/<communication/team> -denyaddandcustomizepages $false

You can reference the article below for further information. 

Save site as a template for Modern Team and Communication Site in SharePoint Online - SharePoint Sta...

 

If I have answered your question, please mark your post as Solved

If you like my response, please give it a Like :smile:

Appreciate your Kudos! Proud to contribute! :)

 

@Deleted

I thought you could do this with scripting?

How would I move this site to another location?

@Lee-Martin 

Not anyone that I can find online. 

To move site to another location, See How to move sites in SharePoint | SharePoint Maven

 

I am also adding the below 

SharePoint classic and modern experiences - Microsoft Support

 

If I have answered your question, please mark your post as Solved

If you like my response, please give it a Like :smile:

Appreciate your Kudos! Proud to contribute! :)

 

@Get-PnPSiteTemplate

This is for classic sites. "To move site to another location, See How to move sites in SharePoint | SharePoint Maven"


I find it completely impossible that Microsoft has not created a way to move a site from a development environment to a production environment. There simply must be a way to do this.

I have found commands like this which imply that it is possible (Get-PnPSiteTemplate), so there simply must be a way.

@Lee-Martin Check below available options in SharePoint online. These Microsoft official documentations should help you:

  1. Introducing the PnP provisioning engine 
  2. Get started creating site templates and site scripts 
  3. Apply and customize SharePoint site templates 

Please click Mark as Best Response & Like if my post helped you to solve your issue. This will help others to find the correct solution easily. It also closes the item. If the post was useful in other ways, please consider giving it Like.

For SharePoint/Power Platform blogs, visit: Ganesh Sanap Blogs

@Lee-Martin 

 

I have screenshotted the part again in which it is mentioned that it is not supported:

RecepGencaslan_0-1679474561495.png

 

Here is the article for your reference: Save, download, and upload a SharePoint site as a template | Microsoft Learn

 

I am sorry that there is no solution as far as I can see it.

 

If I have answered your question, please mark your post as Solved

If you like my response, please give it a Like :smile:

Appreciate your Kudos! Proud to contribute! :)