Is it possible to create a site collection (top level site) based on a custom web template, created in VS in the form of an app or sandbox?

I know there's a possibility to use the "Select a template later..." option, but I would like to select a template directly from the list.

If it's not possible... do you think it will be doable to create a site collection with PowerShell and provision set web template package (app|sandbox) afterwards?

Thanks in advance!!

  • This is the only option as the Web Template for the Site Collection is Site Collection-scoped and if there is no Site Collection there is also no place for you to upload it. Commented Sep 19, 2013 at 4:08

2 Answers 2


I've looked into this same requirement. We went down the road of creating a site collection and selecting it later. The PowerShell options, http://technet.microsoft.com/en-us/library/fp161370.aspx, for creating a site collection should provide the same. I don't see an option to upload a template and create the site at the same time.


  • 1
    Thank you David. I thought so... I'm going to investigate the PowerShell/CSOM way to auto provision some stuff in the upcoming days/weeks. I'll post my experience on this path later on... Commented Sep 18, 2013 at 14:50
  • Did you find any solution for the same.I wanted to know if the same is achievable using sharePoint Online management shell
    – Jinxed
    Commented Oct 22, 2015 at 7:07

You can't deploy site templates (onet.xml files) to the Office 365, so you are stuck with the templates that they offer you for site-collection creation. Webs on the other hand you can create your own web templates and use.

One interesting concept that might help you out are remote site provisioning, where an external provisioning provider is responsible for configuring your site-collection. It works the way that you create your site-collection using e.g. blank or publishing or whatever template that is closest to what you want. Then you install your custom sharepoint app, it will on its oninstalling event configures the host site, by activating features installing content and what other things you need configured. That way you have a reproducible way to create multiple site-collections from a "template".You can read more about the concept here: http://blogs.msdn.com/b/vesku/archive/2013/08/23/site-provisioning-techniques-and-remote-provisioning-in-sharepoint-2013.aspx

  • Thank you SimTex for your useful information! It points me in the right direction. Commented Oct 6, 2013 at 7:52

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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