Here I would explain details on how to create a SharePoint subsite in SharePoint 2010 and SharePoint 2013. We would do it using SharePoint out of box options, later in this blog I would explain details on how to create site programmatically using PowerShell Commands.
Create new site in SharePoint 2010:
To create a site in SharePoint 2010, need to open sample site.
now go to Site Actions -> New site(Need to make sure you have site Admin rights)
on click of New Site will open following page to select templates.
Select required template based on your need, supply name and site URL suffix that will appear as http://contoso.com/yoursitename and click on Create.
This will create a new site under contoso.com with specified template.
Create new site in SharePoint 2013:
To create a site in SharePoint 2013, need to open sample site.
now go to Top Right Gear Icon -> Site contents(Need to make sure you have site Admin rights)
This will take you to Site Content Page, which will look as sample shown below.
Now click on New Subsite this will open following Page. Specify Name, Site URL, Template and Permission if need to inherit from parent site.
Once we have specified above fields, click on Create, this will create a new site for us in SharePoint 2013.
Create site using PowerShell Commands:
We can use following PowerShell commands to create a subsite.
New-SPWeb –url <new site url> -name <new site name> -template <template name>
New-SPWeb –url http://contoso.com/sampleSite -name “sample Site”-template STS#0 –AddToTopNav –UniquePermissions –UseParentTopNav
More Site templates code can be viewed from following references.
for queries, suggestions, feedback contact me on