To customize a modern SharePoint site template, define the desired configuration actions in a JSON site script, register that script, and create a site design that references it. You can then offer the design when creating sites or apply it to supported existing sites. This is the modern, reusable approach—not the older “save this site as a template” workflow.
What a modern SharePoint site template does
A modern site template is a registered site design backed by one or more JSON site scripts. Each script contains an ordered set of configuration actions that SharePoint runs when the template is applied—for example, creating a list or applying a theme. A template is therefore a repeatable configuration, not a container for arbitrary code.
Microsoft’s site-template overview describes templates as usable both during new-site creation and on existing modern sites. The older site-saving mechanism is not the standard way to build a modern reusable template.
Choose the right customization scope
| Need | Approach |
|---|---|
| Set a reusable organization-wide starting point | Register a site design and its site scripts, then make the design available to the intended users. |
| Make a template the default for a site type | Set the design as a default using the documented IsDefault method; verify the current cmdlet and tenant behavior before rollout. |
| Align sites associated with a hub | Associate a hub template so eligible joining sites inherit its template and theme. |
| Change appearance on one site | Use the site’s Change the look experience to select a modern theme. |
Templates, defaults, and hub templates solve different problems: a template is reusable configuration, a default influences the starting choice for a site type, and a hub template extends a consistent experience to associated sites.
#1 Best Overall
Create and publish a reusable site template
- Plan the site configuration. List the actions the template should perform, such as creating a particular list or setting a theme. Confirm that each action is supported for the target site type.
- Write the JSON site script. Define the ordered actions in JSON. Keep the script focused on configuration SharePoint supports; do not assume it can run unrestricted custom code.
- Register the script. Use SharePoint Online PowerShell or the SharePoint REST interface to register the JSON script with the tenant.
- Create a site design. Register a design that references the site script and specifies which kind of site it targets.
- Make it available and apply it. Publish the design for the appropriate audience. Users can select organization templates in the relevant site-creation or site-settings experience; administrators can also apply a design to an existing eligible site.
- Validate the result. Test the design on a non-production site of the intended type, then confirm that each action completed as expected before using it for provisioning at scale.
Microsoft’s site design getting-started guide documents the script-and-design workflow, along with PowerShell and REST options. For an existing site, administrators can use Invoke-SPOSiteDesign; the cmdlet can also support bulk application.
Set or change a default site template
SharePoint has default templates as well as organization-created designs. Microsoft identifies Topic as the default communication site template and Team collaboration as the default team site template. Administrators can mark a registered design as a default with the documented IsDefault method; consult the current default-template guidance for the procedure and current behavior.
Rank #2
When registering a design, Microsoft documents these WebTemplate values: 64 for a team site, 1 for a team site with group creation disabled, 68 for a communication site, and 69 for a channel site. These are implementation details, not labels to copy blindly: verify the current tenant and cmdlet documentation, target site type, and intended behavior before using them in production.
Apply a template to an existing site
A published design is not limited to newly created sites. Administrators can apply it to supported existing modern site collections through the SharePoint interface or with Invoke-SPOSiteDesign. Microsoft’s application guidance lists eligible site types that include group-connected and non-group team sites, communication sites, channel sites, and certain classic team and publishing sites.
What’s actually slowing this PC down?
Pick the symptom - the matching free tool is one click away.
Rank #3
Eligibility does not mean every action in a script will be appropriate for every site. Check the design’s target type and test its actions against the specific site before applying it broadly. For repeat deployments, an administrator can use PowerShell to apply the design across multiple eligible sites.
Use a hub template for associated sites
A hub template combines one or more site scripts and can be associated with a SharePoint hub. Eligible sites that join the hub inherit its template and theme, which helps establish shared configuration across the hub’s sites. See Microsoft’s hub site template guidance for setup and permissions.
Rank #4
- Access: A hub template is initially available to everyone. Administrators can grant View rights to specified principals to restrict who can see and use it.
- Multi-Geo: In a Microsoft 365 Multi-Geo deployment, the joining site must be in the same geo as the hub for the hub template to work.
- Channel sites: Microsoft’s getting-started documentation says channel sites are automatically blocked from joining a hub.
Customize appearance with modern themes
For a site’s visual theme, use Change the look in the SharePoint site experience. Administrators can manage themes with PowerShell, while developers can use CSOM or REST. Microsoft lists built-in choices including Teal, Blue, Orange, Red, Purple, Green, Periwinkle, Cobalt, Dark Teal, and Dark Blue; availability and the choices shown can depend on the site and tenant configuration. See the site theming overview for current options.
Microsoft recommends modern themes with modern pages. If a classic theme is used with modern pages, test readability and accessibility rather than assuming the result will be suitable.
Recommended Free Tools
Best Value
Understand custom-script and legacy customization limits
Custom script is generally blocked by default on many SharePoint sites, including modern team and communication sites. Microsoft documents temporary per-site enablement through SharePoint Online Management Shell or PnP PowerShell, but an allow-custom-script change is overridden to Not allowed within 24 hours. That is a time-limited setting, not a durable template capability. Enabling custom script also has security consequences: users with the Add and Customize Pages permission can add scripts. Review Microsoft’s custom-script policy guidance before changing it.
Do not use classic master pages, classic user custom actions for injected JavaScript, or legacy site-saving workflows as the default modern customization path. Microsoft’s modern-team customization guidance identifies classic techniques that are unsupported or restricted on modern sites and points developers toward modern extensibility, including SharePoint Framework Extensions. Because implementation support can vary by site type and documentation changes over time, verify the current capability before adopting a legacy technique.
Quick Recap
Plan governance before rolling templates out
- Audience: Decide who should be able to discover and apply each design; use access permissions where appropriate.
- Site types: Match designs to supported team, communication, channel, or other eligible site types and test the actions on each relevant type.
- Administration: Assign the SharePoint administration and developer access needed to register scripts, designs, defaults, and hub associations.
- Security: Prefer supported site-script actions over enabling custom script; where custom script is necessary, account for its permissions and automatic 24-hour reset.
- Geography: In Multi-Geo environments, account for the same-geo requirement when using hub templates.
- Maintenance: Recheck PowerShell cmdlet syntax, template identifiers, and supported customization paths against current Microsoft documentation before production changes.
Product prices and availability are accurate as of the date/time indicated and are subject to change. Any price and availability information displayed on Amazon at the time of purchase will apply.

