SharePoint Site Templates: Custom Provisioning & REST API Best Practices
Question details
The user needs to compare SharePoint's built-in template feature with advanced methods like PnP PowerShell and REST API to provision custom sites, lists, and libraries.

- Product
- Microsoft SharePoint
- Device & OS
- not provided
- Scenario
- Provisioning new SharePoint sites that include custom pages, SPFx web parts, customized lists, and specific content.
- Observed behavior
- The built-in Save as template feature fails to properly include complex custom web parts, and users are not prompted to select custom templates during new site creation without manual PowerShell intervention or Solution Gallery uploads.
Ensure you have SharePoint Administrator or Site Collection Administrator permissions and that custom scripting is enabled for your tenant before attempting to export or upload custom site templates.
Use the Built-In 'Save as Site Template' Feature
Best for basic SharePoint site structures that only require simple lists and document libraries without complex SPFx web parts.
Open your SharePoint site, click the gear icon in the top right corner to open the Settings menu, and select 'Site information' followed by 'View all site settings'.
Under the 'Site Actions' category, click on 'Save site as template'. Enter a file name, template name, and description.
Check the 'Include Content' box only if you need to copy existing files and list items. Click 'OK' to save the template to the Solution Gallery.
Provision Custom Sites Using PnP PowerShell
The recommended approach for highly customized sites containing modern SPFx components, customized lists, and repeatable enterprise deployments.
Troubleshoot Custom Template Uploads and 404 Errors
Resolve common deployment issues such as templates not appearing in the creation menu or returning 404 errors.
Manage Your SharePoint Documents with WPS Office
While SharePoint is excellent for managing site architecture and team collaboration, handling the actual Word, Excel, and PowerPoint documents stored there requires a robust office suite. WPS Office provides a free, lightweight, and highly compatible alternative to Microsoft Office for all your document needs.
- 1. Download and Install: Get WPS Office from the official website and install it on your PC or Mac.
- 2. Open SharePoint Files: Download your team documents from your SharePoint library and open them directly in WPS Office.
- 3. Edit and Save: Edit your files using familiar tools and save them back in standard Microsoft Office formats to upload back to SharePoint.

Frequently Asked Questions
Why doesn't 'Include Content' copy my custom web parts in SharePoint?
The built-in Save as site template feature has strict size limits (usually 50MB) and does not natively support migrating modern customized SPFx web parts or certain classic features. PnP PowerShell is required for complex web parts.
Why do I get a 404 error when applying a SharePoint site template?
A 404 error during deployment usually means the target site URL is incorrect, a referenced template element (like a specific list or file) is unsupported, or there is a base-template mismatch between the source and target sites.
How do I make my custom template appear when creating a new SharePoint site?
If a saved template does not appear in the Custom tab during site creation, you must ensure custom scripting is enabled for your tenant, manually upload the exported .wsp file to the Site Collection Solution Gallery, and activate it before provisioning the new site.





