Let’s say that you’ve created a SharePoint Online site that you want to save and potentially re-use elsewhere, or even in another Office 365 tenant. You can save all the structure and potentially all the data by creating a site template. Here’s how you do that.
Select the cog in the top right of the site to display the menu shown above. From this menu select Site Settings.
In site settings select Save site as template from under the Site Actions heading on the right.
Now give your site template a File Name, a Template Name and a Template Description.
You will also notice that you can check the option to Include Content if you wish. With this unchecked the template will only contain the structure of your site i.e. the document libraries, lists, look and feel, etc. However, if you check this option then all the data within these libraries, lists, calendars, etc will also be included.
If everything went to plan then you should see a message confirming that the template has been created and stored in the solution gallery.
You can access the solution gallery by selecting the hyperlink on the page or at any stage using via the Site Settings option as detailed previously. Here I’ll select the hyperlink to navigate directly to the gallery.
In the solution gallery you should find your newly created template (with the NEW icon next to it) plus any existing templates.
This gallery holds solutions (templates and custom code) that is available across the entire Site Collection.
What happens if you want to migrate this new template to a completely different site collection? Easy.
Firstly, click on the template name and save the download to your local machine.
Navigate to the solutions gallery in the destination Site Collection and select the Upload Solution button from the Ribbon Menu. Locate the file you just downloaded from the source solution gallery (it will have a .WSP extension typically) and upload it into the destination.
Once uploaded you’ll see the Activate Solution dialog window displayed as shown above. You are unable to use solutions until they have been ‘activated’. To do this simply press the Activate button on the Ribbon menu.
You should now see that the template is Activated.
Now if you go and create a new site anywhere in the Site Collection and select the Custom tab in the Template Selection you should see the template name you uploaded as shown above.
If you use this template you will get a new site based off the original template that you created (also potentially with the data it contained if you selected that as well).
You can of course create a new site based off a template at the root of a Site Collection using the method I detailed previously at: