Sharepoint - Can I create a sharepoint demo site that reverts back to a template

Unfortunately, there is no option like Site Recovery to a specific point in SharePoint. Meanwhile, there are a lot of workarounds to do this.

  1. Save Site as a template.
    • You can save a copy from the current site as a template.
    • Create a new site with this template for training purpose,
    • Once the training session finished, you can delete the used site and create a new one from the main template for the next training session.

Note: the save site as a template is not working with Publishing template and community template, read more at missing save site as a template.

  1. Backup / Export & Restore / Import SharePoint Site.

    • You can also take a backup (Export) at the specific time before the training session.
    • Once the training is finished, you can restore (Import) the backup on the same site to start a new training session with a fresh site.

Note: You can run this operation in daily basis using task scheduler or timer job.

See the details steps of backup & restore site collection - import & export sub site using Central admin or PowerShell


For SharePoint on-premises I would also argue that database Backup and Restore is a simple and reliable approach.

Another one, that will also work with SharePoint Online, is to provision the training sites using the PnP Provisioning Engine and the PnP PowerShell Commands. Use the Get-PnPProvisioningTemplate cmdlet to create a template of your training site. Then create a pool a new training site collections and apply the template using the Apply-PnPProvisioningTemplate cmdlet. Delete used training sites and take new ones from the pool.

However, the PnP approach may also have limitations depending on the artifacts that you need to provision. It's also not too happy about Publishing sites.

Tags: