I need to create a large amount of sub sites. Each one will be the exact same to support various products. I have code written already to create a subsite and add the apps to it, but its proving to be a lot of work to create the pages to look the way that i want. If i manually create a subsite and make it exactly the way i want it, is it possible to just duplicate this subsite and give it a different name?

I cant seem to find code anywhere that will allow me to set what web parts i want to show on the home page. This would make things so much quicker to get this done.

I am using the client side object model with a C# application.


You can save a site as a template (through Site Settings GUI). When create sites using this templates with different name etc.

  1. Instruction how to save site http://www.learningsharepoint.com/2012/11/23/how-to-save-site-as-template-in-sharepoint-2013/

  2. Here http://get-spscripts.com/2011/02/finding-site-template-names-and-ids-in.html and Programmatically create Site using Custom Web Template in Sharepoint 2010 how to find Site Template Name and ID

  3. Then you this "wci.WebTemplate = "STS#0";" - just change Name and ID

  • Do you have any guide that shows how to do this? When creating a subsite i can define the "wci.WebTemplate = "STS#0";". Can i replace this value with the file path of the template? – Dan Hastings Sep 17 '15 at 11:46
  • I have a .wsp file, but when i try to use the file path as the template it throws an exception. How should this template be used? – Dan Hastings Sep 17 '15 at 11:54
  • I've edited my comment. I dont think you have to use WSP itself. – Trike Sep 17 '15 at 12:02
  • The template that i have created is correctly showing up under the "Solution Gallery". When i run "Get-SPWebTemplate" in powershell, i dont see the templates that i created. – Dan Hastings Sep 17 '15 at 12:14
  • Try $site = Get-SPSite “portal” #new line# $site.GetWebTemplates(1033) | format-list name, title - don't forget to use your locale - it could differ from "1033" - do you see you template in the output? - – Trike Sep 17 '15 at 12:23

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.