Create and use site templates in SharePoint Server versions
Applies ToSharePoint Server Subscription Edition SharePoint Server 2019 SharePoint Server 2016

Note: Moving site templates between different versions, such as SharePoint 2010 to SharePoint 2013, is not supported. Moving between SharePoint Servers 2013, 2016, and 2019 should work, though you may need to check the template to ensure it's complete.

After you have customized your SharePoint site so that it contains the libraries, lists, views, workflows, logos, and other elements that you require for your business, you may want to create a template of that site for reuse. A site template is like a blueprint for a site. Creating a site template allows you to capture your customizations, so that they can be quickly applied to other SharePoint environments and even use the template as the basis for a business solution. Users can create new sites based on the template or you can hand it off for additional development in Visual Studio.

This flow chart shows the process for creating and using site templates in SharePoint Online.

Understanding a site template

Before you work with a site template, it’s helpful to understand what a site template is in more detail so you can use it more effectively.

Note: This article contains information for SharePoint Server (on-premises) only. For information about site templates in SharePoint, see Using templates to create different kinds of SharePoint sites.

This section discusses the following:

You're probably familiar with the default site templates, such as Team Site, Project Site, and Communities Site. SharePoint site templates are prebuilt definitions designed around a particular business need. You can use these templates as they are to create your own SharePoint site, and then customize the site as much as you want. For more information, see Using templates to create different kinds of SharePoint sites.

In addition to these default site templates, you can also create your own site template based on a site you've created and customized. A custom site template is a way to package site features and customizations that you can add to a solutions gallery. Custom site templates are often used to deploy solutions in other sites or to provide site consistency within your organization. For example, you may have a standard policy on project management, and so you require the use of a custom project site template for all new projects.

A custom site template is a powerful feature that allows you to create a solution and then share that solution with your peers, the broader organization, or outside organizations. You can also package the site into a Web Solution Package file (.wsp) and open it in another environment or application such as Visual Studio and further customize it there. Turning your customized site or business solution into a template is an extremely useful and very powerful capability. Once you start to package your solution as a template, you begin to realize the potential of SharePoint as a platform for business applications. Site templates make all of this possible.

When you save a SharePoint site as a template, you're saving the overall framework of the site — its lists and libraries, views and forms, and workflows. In addition to these components, you can also include the contents of the site in the template; for example, the documents stored in the document libraries or data in the lists. This could be useful to provide sample content for users to get started with. But consider that including content could also increase the size of your template beyond the 50 MB site template limit.

Most of the features in a site are included and supported by the template. However, there are several features that are not supported.

  • Supported    Lists, libraries, external lists, data source connections, list views and data views, custom forms, workflows, content types, custom actions, navigation, site pages, master pages, modules, and web templates.

  • Unsupported    Customized permissions, running workflow instances, list item version history, workflow tasks associated with running workflows, people or group field values, taxonomy field values, publishing sites and pages, and stapled features.

When you create a site template, information about site features and content types is also saved. When you use the site template in a different site collection, those features must be available and activated for the site template to work. Problems can arise when moving between site templates from different SharePoint versions. Certain features and content types may not even be available depending on the SKU and configuration.

Saving a site as a template is a powerful feature because it offers so many uses of custom sites. Here are the immediate benefits you get from saving a site as a template:

  • Deploy solutions immediately    Save and activate the template in the solutions gallery and let other employees create new sites from this template. They can select it, and then create a new site from it, which will inherit the components of the site, its structure, workflows, and more. In short, just save the site as a template, activate it, and off you go.

  • Portability    In addition to deploying a custom solution in your environment, you can download the .wsp file, take it on the road, and deploy it in another SharePoint environment. All of your site customization is conveniently stored in one file.

  • Extensibility    As a Web Solution Package, you can open your customized site in Visual Studio, perform additional development customization to the template, and then deploy it to SharePoint. As a result, site development can go through a solution life cycle (develop, stage, and put into production).

As you begin to create custom sites in SharePoint, you'll discover even more benefits to turning your site into a solution that can be made portable across the organization.

Work with a site template

The basic steps to working with a site template are as follows:

When you save a site template, you create a Web Solution Package file (.wsp) is that is stored in the Solutions Gallery for further use. Only the current site is saved; not any subsites below the site.

  1. Navigate to the top-level site of your site collection.

  2. Click Settings SharePoint Online Public Website Settings button and then click Site Settings.

  3. In the Site Actions section, click Save site as a template.

    Note: The Save site as a template option may not be available in all situations. For more information, see the section Troubleshoot a custom site template below.

  4. Specify a name to use for the template file in the File name box.

  5. Specify a name and description for the template in the Template name and Template description boxes.

  6. To include the content of the site in the site template, select the Include Content check box. The limit is 50 MB and cannot be changed.

    Important: Before creating a site template that includes content, check the workflow history list for the site. If there are thousands of items in the list, it may take a long time to create the site template or you may exceed the limit of 50 MB. In this case, it’s a good idea to modify the workflow association to a use new workflow history list and then delete the original workflow history list before creating the site template.

  7. Click OK to save the template.

    If all of the components on the site are valid, the template is created, and you see a message that states "Operation Completed Successfully."

  8. Do one of the following:

    • To return to your site, click OK.

    • To go directly to the site template, click Solutions Gallery.

When you download your site template, you create a .wsp file that is portable and easy to use in other site collections.

  1. Navigate to the top-level site of your site collection.

  2. Click Settings SharePoint Online Public Website Settings button and then click Site Settings.

  3. In the Web Designer Galleries section, click Solutions.

  4. If it's necessary to activate the solution, select it, and in the Commands group, click Activate. Then, on the Activate Solution Confirmation screen, in the Commands group, click Activate.

  5. Click its name in the solutions gallery, and click Save.

  6. In the Save As dialog box, browse to the location where you want to save the solution, click Save, and then click Close.

You can upload a .wsp file to the same site collection or different site collections in the same or different SharePoint environments.

  1. Navigate to the top-level site of your site collection.

  2. Click Settings SharePoint Online Public Website Settings button and then click Site Settings.

  3. In the Web Designer Galleries section, click Solutions.

  4. In the Commands group, click Upload or Upload Solution, and then in the Add a Document or Add a Solution dialog box, click Browse.

  5. In the Choose File to Upload dialog box, locate the file, select it, click Open, and then click OK.

  6. To activate the solution, on the Activate Solution confirmation screen, in the Commands group, click Activate.

After you create a site template and confirm it is activated, you can create a site based on the template.

There are several ways to create a new site or subsite. You can use the SharePoint Designer or create a subsite from an existing site. Follow these steps to create a simple subsite in SharePoint using your saved site template:

Create a subsite

  1. Click Settings SharePoint Online Public Website Settings button and then click Site Settings.

  2. Click Sites and workspaces under Site Administration.

    Sites and workplaces section of the Site Settings page
  3. Click Create in the Sites and Workspaces dialog.

    The create site link in the Sites and workplaces dialog box
  4. In the New SharePoint Site dialog, enter the Title for the page, a Description, and the URL name for users to use to get to your site.

    Top part of Create Site Dialog
  5. Under the Template Selection, click the Custom tab, and click your saved template.

    Bottom half of the Create Site Dialog
  6. Select the User Permissions and Navigation options you'd prefer.

  7. When you're done, click Create.

You can control when a site template appears in the Create dialog box or its resource usage by activating and deactivating site templates in the Solution Gallery.

  1. Navigate to your Solution Gallery.

  2. Click Settings SharePoint Online Public Website Settings button , Site Settings, and, then under the Web Designer Galleries section, click Solutions.

  3. Select a site template, and then do one of the following:

    • Activate    Makes the site template available for use when users create new sites through the Create dialog.

    • Deactivate    Removes the site template from the Create dialog box. A deactivated site template is unavailable for site creation and can be deleted.

    • Delete    Removes the site template from the Solution Gallery, but moves it into to the Recycle Bin for approximately 90 days by default before the Recycle bin is emptied. This is helpful if you later decide to restore it. If you need to delete a site template, you must deactivate it first.

      Notes: 

      • It is important to monitor the growth of the Solutions Gallery. Each entry has a resource usage number assigned to it. Solutions can consume resources, and for that reason they may be temporarily disabled if resource usage exceeds quota.

      • If you upload a site template to a Solutions Gallery, and the original site template is currently deactivated, you can potentially overwrite the original site template. To avoid this, make sure to uniquely name the site template you are uploading. However, you will not be able to activate both solutions at the same time, and will need to deactivate the original if you wish to use the newly uploaded site template for site creation.

Troubleshoot a custom site template

The following sections can help you resolve problems when you are working with a custom site template.

The following sections describe common problems you may encounter when working with site templates and their recommended solutions.

Note: The Save site as template option is only supported in SharePoint Server 2013, SharePoint Server 2016, SharePoint Server 2019 (classic sites only), and SharePoint (classic sites only). The Save site as template option is not supported in SharePoint Server 2019 (modern sites) or SharePoint (modern sites)

The site template is based on a site type that is not available in the current business plan

The availability of site templates depends on the features set up by your administrator, whether you work with sites or site collections, and what plan you have for Microsoft 365 or SharePoint Server. The following table summarizes the site type availability between different plans. For more on templates, see Using templates to create different kinds of SharePoint sites.

Category

Site Type

Site Collection

Site

Microsoft 365 for Small Business

Microsoft 365 for Medium or Large Business

SharePoint Server 2013

SharePoint Foundation 2013

SharePoint Server 2016

SharePoint

Collaboration

Team

Yes

Yes

Yes

Yes

Yes

Yes

Yes

Yes

Collaboration

Blog

Yes

Yes

Yes

Yes

Yes

Yes

Yes

Yes

Collaboration

Project

Yes

Yes

Yes

Yes

Yes

No

Yes

Yes

Collaboration

Community

Yes

Yes

No

Yes

Yes

No

Yes

Yes

Enterprise

Document Center

Yes

Yes

No

Yes

Yes

No

Yes

Yes

Enterprise

Records Center

Yes

Yes

No

Yes

Yes

No

Yes

Yes

Enterprise

Business Intelligence Center

Yes

Yes

No

Yes

Yes

No

Yes

Yes

Enterprise

Enterprise Search Center

Yes

Yes

No

Yes

Yes

No

Yes

Yes

Enterprise

Basic Search Center

No

Yes

No

No

Yes

No

Yes

Yes

Publishing

Publishing Site

No

Yes

No

No

Yes

No

No

Yes

Publishing

Publishing Site with Workflow

No

Yes

No

No

Yes

No

No

Yes

Publishing

Enterprise Wiki

No

Yes

No

Yes

Yes

No

No

Yes

The site template was created in a previous version of SharePoint or in a different language

Moving site templates between different versions, such as SharePoint 2010 to SharePoint 2013, or different languages is not supported.

Unavailable features prevent site creation

You get an error message stating that certain features are not installed, activated, or licensed.

Screen shot of an error message showing an error you might get if unavailable features prevent site creation in SharePoint Online.

When the site template was created, all site features were saved with the template, regardless of whether they were activated or not. However, one or more of these site features are not activated or available in the current site collection. This situation can arise when you are moving site templates between different Microsoft 365 plans or between SharePoint Server on premise and SharePoint

To help you resolve the situation, the error message usually contains the Feature Description and GUID. If the feature is available in the current site collection, you can activate it. If the feature is not available in the current site collection, you cannot use the site template to create a site.

For a list of SharePoint features and GUIDs, see Sharepoint 2013: Existing Features GUID. For a list of service descriptions based on Microsoft 365 plans, see SharePoint Service Description.

The site template cannot be created or does not work correctly

One or more of the following issues may be the cause:

  • Check to see if any lists or libraries exceed the List View Limit Threshold of 5000 items as this can block creation of a site template.

  • The site may be using too many resources and therefore the site template exceeds the 50 MB limit. You can see how much resources are being used in the Solutions Gallery where the site template was created. You may be able to reduce the site resources, and then save the site template again.

  • If you are saving content with the site template, you may need to clear the Include Content check box. Although you can increase the site template limit in SharePoint Server on premise by using a PowerShell command, this command is not available in SharePoint. Be careful increasing the site template size in SharePoint Server on premise and moving it to SharePoint as it can prevent its use. For more information about using site templates on SharePoint Server, see Save, download, and upload a SharePoint site as a template.

  • There are problems displaying data from a list that uses a lookup column. For more information, see Template-generated list doesn’t display data from the correct lookup list in SharePoint.

The Save site template command is not available

The Save site as template command is not supported and can cause problems on sites that use the SharePoint Server Publishing Infrastructure. If your site has the publishing infrastructure enabled, you can't use the site template feature.

For more information, see Enable publishing features and About publishing-enabled site templates.

There are problems with the site templates after upgrading from SharePoint 2010

If you have custom site templates that you want to continue to use after your subscription has been upgraded to SharePoint 2013, then you must recreate them before upgrading your site collection. Otherwise, all new site templates will not work after you upgrade. To recreate the site template, create a new subsite based on the 2013 experience, customize it again to match the template that you had, and then save the customized subsite as a template.

For the steps to recreate your custom site templates in SharePoint 2013, see Upgrade site templates.

Occasionally, you may need to dig deeper to unearth a problem with a site template. For example, you may have inherited the site template and do not know how it was created or what it contains.

Under the covers, a .wsp file is a cabinet file (CAB), which is a file that contains other files. This cab file contains a manifest file that defines elements in your site. If you are curious about the content, do the following:

  1. Copy the .wsp file.

  2. Rename the file extension from .wsp to .cab.

  3. Double-click the file, select all the files displayed, right-click the selection, click Extract, locate a folder in the Select a Destination dialog box, and then click Extract.

You can now see the Manifest.xml , the folders referenced in the Manifest.xml, and all required elements, schemas, resources and feature files used to recreate the site. If you chose to include the contents of the site when you created the site template, you can also see the content, such as document library files.

Screenshot of Windows Explorer that shows an unzipped Web Solution Package (.wsp).

Important: Do not unzip the original .cab, and alter the manifest, or the contents, of a .wsp. Creating sites from packages edited at this level can lead to instability in sites created from the template. However, .wsp files can be safely opened and edited in Microsoft Visual Studio in order to further customize the template.

Note: The Web Solution Package you create in a site template is a partial trust user solution that has the same declarative format as a full trust SharePoint solution. However, it does not support the full extent of feature element types that are supported by full trust solutions.

Need more help?

Want more options?

Explore subscription benefits, browse training courses, learn how to secure your device, and more.

Communities help you ask and answer questions, give feedback, and hear from experts with rich knowledge.