Forum Discussion

Lee-Martin's avatar
Lee-Martin
Copper Contributor
Mar 16, 2023

Download a template - modern sites

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 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

  • Anonymous's avatar
    Anonymous

    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 https://learn.microsoft.com/en-us/sharepoint/dev/general-development/save-download-and-upload-a-sharepoint-site-as-a-template#save-a-site-as-a-template-to-the-solutions-gallery

     

    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. https://technet.microsoft.com/en-us/library/fp161394.aspx 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 https://technet.microsoft.com/en-us/library/fp161372.aspx 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. 

    https://sharepoint.stackexchange.com/questions/255756/save-site-as-a-template-for-modern-team-and-communication-site-in-sharepoint-onl

     

    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! ðŸ™‚

     

    • Lee-Martin's avatar
      Lee-Martin
      Copper Contributor
      Deleted

      I thought you could do this with scripting?

      How would I move this site to another location?
      • Anonymous's avatar
        Anonymous

        Lee-Martin 

        Not anyone that I can find online. 

        To move site to another location, See https://sharepointmaven.com/how-to-move-sites-in-sharepoint/

         

        I am also adding the below 

        https://support.microsoft.com/en-us/office/sharepoint-classic-and-modern-experiences-5725c103-505d-4a6e-9350-300d3ec7d73f

         

        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! ðŸ™‚

         

Resources