A group of Microsoft Products and technologies used for sharing and managing content, knowledge, and applications.
To restore a previous site template in SharePoint, you can remove the newly applied site template using PowerShell or JavaScript. Here’s how you can do it:
- Using PowerShell: Execute the following command, replacing the ID with the ID of the site template you want to remove:
Remove-SPOSiteDesign <SiteTemplateID> - Using JavaScript: You can also use the following JavaScript snippet:
RestRequest("/_api/Microsoft.SharePoint.Utilities.WebTemplateExtensions.SiteScriptUtility.DeleteSiteDesign", {id:"<SiteTemplateID>"});
If you're unsure about the ID of the site template you want to restore, you can run the Get-SPOSiteDesign cmdlet to list all site templates and identify the default ones.
After removing the new template, you can apply the default template again to restore your previous site configuration.
References: