We are using SP2013 standard on-premise. There are 2 existing site collection. Both are built with team site template with publishing infrastructure enabled. The URLs are:


I need to move Asite under Bsite like http://sharepoint.com/sites/Bsite/Asite/. So I export Asite with Export-SPWeb. Then create a blank subsite using publishing site template as http://sharepoint.com/sites/Bsite/Asite/. Finally I use Import-SPWeb to import towards http://sharepoint.com/sites/Bsite/Asite/

But it returns 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 CMSPUBLISHING#0. You can import sites only into sites that are based on same template as the exported site.

May I know how to work around it?

1 Answer 1


In this scenario, you have to create the new subsite without any template then import the Asite on that url.

New-SPWeb -Name "Asubsite" -Url "http://sharepoint.com/sites/Bsite/Asite/"

Now run the import command.

  • Thanks. I never know it is so easy. The import is done but now all pages under /Bsite/Asite/ are throwing "InvalidPageLayoutException". I checked the pages are using layout "/sites/Asite/_catalogs/masterpage/ASite_PageLayout.aspx". Do you know how to fix?
    – Mark L
    Apr 13, 2016 at 4:29
  • I m not sure about it... but if you open a new question with complete detail..someone else will respond....i am afraid as this not scope of question so easily ignored...mark this post as asnwer and start new one.
    – Waqas Sarwar MVP
    Apr 13, 2016 at 4:38

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.