SharePoint Online: Move Subsite to Another Site using PowerShell

Requirement: Move Subsite to a new site in SharePoint Online

How to move a subsite in SharePoint Online?

As a SharePoint Online administrator, you may need to move a subsite from one site to another. In this blog post, we’ll be walking through the process of moving a subsite from one SharePoint Online site to another using PowerShell, as well as with the web browser interface. This can be helpful if you need to move content or reorganize your site structure. Let’s get started!

Let’s move a subsite to the root site in SharePoint Online using the content and structure page:

  • Go to Site settings page >> Click on “Content and Structure” link (
  • Select the subsite from the Treeview >> Click on “Move” from the subsite’s context menu.
    sharepoint online move subsite to another site
  • Select the target site and click on “OK” to move the subsite to the new site.
    sharepoint online move subsite to another subsite

This moves the subsite to another site in the same site collection. We can also use this method to move the SharePoint Online subsite to another subsite.

PowerShell to move subsite to another site in SharePoint Online :

Let’s move a subsite to the root site with PowerShell.

#Set Parameter values 
$SiteURL  = ""
$NewSiteURL = "/sites/marketing/2017"

#Connect to PnP Online
Connect-PnPOnline -Url $SiteURL -Credentials (Get-Credential) #-Interactive

#Get the Web
$Web = Get-PnPWeb

#Move the site to New URL by Setting relative URL
$Web.ServerRelativeUrl = $NewSiteURL

This moves the subsite under to Please note, this method works only within the site collection!

Salaudeen Rajack

Salaudeen Rajack - SharePoint Expert with Two decades of SharePoint Experience. Love to Share my knowledge and experience with the SharePoint community, through real-time articles!

Leave a Reply

Your email address will not be published.