Restore Missing Delete Site and Save Template Options in SharePoint Online
Question details
Find the missing Delete this site and Save site as template commands in SharePoint Online.

- Product
- SharePoint Online
- Device & OS
- not provided
- Scenario
- A user wants to delete a SharePoint site or save it as a template from Site Settings.
- Observed behavior
- The commands are not visible under Site Actions; disabled custom script, permissions, or site type limitations may be involved.
Confirm the site URL and check whether you have the permissions needed to manage the site. To change custom script settings, use an account with the SharePoint Administrator or Global Administrator role and identify your SharePoint admin center URL.
Enable custom script for the affected SharePoint site
Use SharePoint Online PowerShell to change the site customization setting, then check Site Settings again.
Enabling custom script may restore some classic site features, but it does not guarantee that both commands will appear. Site type, permissions, and other restrictions can also affect availability.
SharePoint Online may automatically reset the custom script setting after 24 hours. Enabling it can allow site owners to add custom code, so follow your organization's security policy.
Open PowerShell and run Install-Module Microsoft.Online.SharePoint.PowerShell if the SharePoint Online Management Shell module is not already installed.
Run Connect-SPOService -Url https://yourtenant-admin.sharepoint.com, replacing the URL with your SharePoint admin center URL, and sign in with an administrator account.
Run Set-SPOSite -Identity https://yourtenant.sharepoint.com/sites/yoursite -DenyAddAndCustomizePages 0, replacing the site URL with the affected site's address.
Reopen the affected site, go to Settings > Site information > View all site settings if available, and check the Site Actions section for the commands.

Check the classic Save Site as Template page directly
Use the direct page address to troubleshoot a missing template link on a compatible classic site.
Delete an eligible site from the SharePoint admin center
Use the admin center when the Delete this site command is unavailable and you have the required administrator role.
Edit SharePoint Documents with WPS Office
WPS Office is a free, lightweight Office alternative with a familiar interface and Microsoft Office format compatibility for an easy transition. It can help you work with documents downloaded from SharePoint, but it cannot change SharePoint site settings or restore missing commands.

Frequently Asked Questions
Why are the site deletion and template options missing?
Disabled custom script can hide some classic site features. The commands may also be unavailable because of your permissions, the site's type, or other SharePoint restrictions.
Does enabling custom script always restore Save site as template?
No. Run Set-SPOSite with -DenyAddAndCustomizePages 0 to enable customization, but the classic template feature must also be supported for the site. Modern group-connected sites do not support that classic feature.
Where can an administrator delete a site if the site setting is missing?
In the SharePoint admin center, go to Sites > Active sites, select an eligible site, and choose Delete. Review the warning before confirming, especially for group-connected sites.
Will the custom script setting stay enabled?
SharePoint Online may automatically reset the setting after 24 hours. Check your organization's policies and the current Microsoft documentation before relying on it for ongoing customization.




