Move Site Collection from one Web Application to another In SharePoint

In this article, I will show How to

Move a site collection from one web application to another in SharePoint

I have two web applications on the same farm and I want to Move a root site collection

Move SharePoint Site Collection to another Web Application

  1. Take a backup for the source site collection.
  2. Restore the taken back up to the destination web application.
  3. Remove the site collection from the old web application.
  4. Delete backup file.

Backup SharePoint Site Collection

Backup-SPSite -Identity http://SiteCollectionPath -Path "C:\\MoveSiteCollection.bak"

This cmdlet will create “.bak” file in the specified path.

You can also use “-force” parameter to overwrite the .bak file if it already exists.

Backup-SPSite -Identity http://SiteCollectionPath -Path "C:\\MoveSiteCollection.bak" -force

Restore SharePoint Site Collection

Restore-SPSite -Identity http://SiteCollectionPath:port -Path "C:\\MoveSiteCollection.bak"

you use also use “-Confirm:$false” parameter to avoid asking for a confirmation

Restore-SPSite -Identity http://SiteCollectionPath:port -Path "C:\\MoveSiteCollection.bak"  -Confirm:$false

Remove SharePoint Site Collection

Remove site collection from the old web application if you need that.

Remove-SPSite -Identity http://SiteCollectionPath -Confirm:$false

Remove SharePoint backup file using PowerShell

Remove the backup file

Remove-Item "C:\\MoveSiteCollection.bak"

Mova SharePoint Site Collection to SubSite in another Web Application

Consider you have a root site collection and you need to move it to as a subsite in another web application, in this case, the backup and restore operations aren’t the option and you should use Export and Import cmdlet

Export SharePoint Site Collection

Export-SPWeb -Identity http://sitecollection -Path c:\\backup\Exportback.cmp -IncludeUserSecurity -IncludeVersions

Import SharePoint Site Collection

Import-SPWeb -Identity http://sitecollection/subsite -Path c:\\backup\Exportback.cmp -Force

Note: Unfortunately, the Import and Export cmdlet doesn’t move the workflow and you will need to move it manually or use other third-party tools.

Change Web Application Port Number In SharePoint

In some cases, you may need to Change a SharePoint Web Application port number, so you can extend your web application and set the desired port as you prefer

  • Open Central Administration > Application Management > Manage web applications.

Manage web application in SharePoint

  • Select the source web application and from the ribbon click on Extend.

extend SharePoint web application

  • The following dialog should be shown to type the new port for the new web application.

extend web application in SharePoint

See Also the Extend Web Application consideration at Extend SharePoint 2016 Web Application

Applies To
  • SharePoint 2016.
  • SharePoint 2013.
  • SharePoint 2010.


8 thoughts on “Move Site Collection from one Web Application to another In SharePoint

  1. Hi! I could have sworn I’ve been to this website before but
    after looking at many of the posts I realized it’s new to me.
    Anyways, I’m certainly happy I found it and I’ll be bookmarking it and checking back often!


  2. Pingback: reference

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s