none
Problems with importing a site to a new server

    Question

  • Hello,

    I am trying to move a site from one server to another, in a different farm.  When I use the import-SPWeb command, I get this error:

    Import-SPWeb : Cannot import site. The exported site is based on the template STS#0 but the destination site is based on the template STS#1. You can import sites only into sites that are based on same template as the exported site.

    Does the new site need to be created first before the other site import can work?  Or, can I directly import to the parent site and import creates the subsite?

    Regarding the template issue, where is the template located on the server? How do I apply the template on the server? How can I tell what template a site is using?

    Thanks.


    Paul

    Monday, November 05, 2012 8:03 PM

Answers

  • STS#0 is a team site, STS#1 is a blank site. This is of course, assuming that you have used the out of the box templates and the site wasn't created with a custom template (in which case you'll need to deploy this customization to your second farm).

    The blank site template (which your destination is using) is not really blank. You can try recreating this destination site as a team site.

    The Import-SPWeb cmdlet has a -force parameter which provides the ability to overwrite the destination.


    Jason Warren
    Infrastructure Architect

    • Marked as answer by Paul Byrum Tuesday, November 06, 2012 4:37 PM
    Monday, November 05, 2012 9:10 PM

All replies

  • STS#0 is a team site, STS#1 is a blank site. This is of course, assuming that you have used the out of the box templates and the site wasn't created with a custom template (in which case you'll need to deploy this customization to your second farm).

    The blank site template (which your destination is using) is not really blank. You can try recreating this destination site as a team site.

    The Import-SPWeb cmdlet has a -force parameter which provides the ability to overwrite the destination.


    Jason Warren
    Infrastructure Architect

    • Marked as answer by Paul Byrum Tuesday, November 06, 2012 4:37 PM
    Monday, November 05, 2012 9:10 PM
  • Hi Paul,

    The source and destination must be created first using the same template in order for the site import to work.

    For example, if you are exporting a current site that was created using "Team Site" template, then the target site must be created with "Team Site" template for the import to work. 

    Regards,

    Jerry

    Tuesday, November 06, 2012 4:15 PM
  • Hi Jason,

    The -Force switch seems not to work if the site templates are different. At least it did not help in my case (SP 2013 SP1).

    One should create the target site really using the site template of the source site.

    In SP 2013 it is possible either on server side...

    - via PowerShell

    $template = Get-SPWebTemplate 'STS#1'
    New-SPSite -Url http://YourSharePoint/NewBlankSite -OwnerAlias 'domain\ownerAccount' -Template $template

    - by editing site template XML at

    "C:\Program Files\Common Files\Microsoft Shared\Web Server Extensions\15\TEMPLATE\1033\XML\WEBTEMP.XML" (change the Hidden attribute from true to false)

    (See details here: http://sharepointpals.com/post/How-to-Create-a-Blank-Site-Collection-and-a-Blank-Sub-Site-on-SharePoint-2013)

    ...or simply from your browser, as detailed here:

    https://pholpar.wordpress.com/2017/06/13/a-quick-and-dirty-solution-to-create-a-blank-site-in-sharepoint-2013/

    Regards,
    Peter

    Wednesday, June 14, 2017 7:25 AM