Sharepoint Replace Root Site

Occasional Contributor


I was wondering if anyone could help. I'm currently repolacing my Classic Site with the Modern Sharepoint and I want to replace my Classic Root Site with my Modern site. However when I go to do this in admin there is no "Replace Site" option.

17 Replies



Are you definitely in the new SharePoint admin centre?


The instructions you have been following are probably these:-


Have you tried PowerShell instead?


Hi @dandelly,


Replace site option is only visible, when root site is chosen on Admin Center's site collections list.


If you are not seeing it, you can use SharePoint Online Management Shell (PowerShell) and Invoke-SiteSwap cmdlet.


@Andrew Hodges 


I think i'm using the correct admin site - see image below. 

I'm not sure about Powershell i'm not a confident programmer and have just used Sharepoint to create pages.



@Matti Paukkonen 


I'm not sure about Powershell i'm not a confident programmer and have just used Sharepoint to create pages.


@dandelly, is your tenant release preference standard release or targeted release. I think admin center feature is available currently in targeted release.


Swapping site with PowerShell is simple, if you need help with scripting it just ping me and I will guide you through it. You can even move original site to another location, like a backup.


Also review preparation actions from documentation before swapping.

@Matti Paukkonen I think we are are standard release. I would be grateful if you could help with the scripting. Thanks.



I have checked 2 tenants, one being targeted release and one standard and they both have the replace site option. 


If you don't have the option then your  particular tenant may not have had it released yet as suggested by other replies. 

@Andrew Hodges  I have Targeted Release tenat set and it still doesn't allow me to replace site? See attached image below.

@dandelly  I have had a go at the Powershell option tou suggested and I got the attached message. I researched how to get a tenant for my home site and tried to change the URL but that option is greyed out! Not sure where to go next??



ConnectSPO uses the Tenant Admin site use this script:-


$adminUPN="<your account>"


$userCredential = Get-Credential -UserName $adminUPN -Message "Type the password."

Connect-SPOService -Url https://$ -Credential $userCredential

Hi @dandelly 


You need to connect to tenant's SharePoint Admin Url with Connect-SPOService.

Connect-SPOService -Url https://<tenant URL>



Hi@Matti Paukkonen 

I'm pretty new to this stuff! I don't understand what the below means can you direct me a little. Once I getv the site swapped I can build sites easily! It is just the coding part i'm unsure of.

Hello @dandelly 


Did you try this from the GUI already and it did not work. then you might need to go through powershell to do this 


If you are using powershell.


First you need to connect to your SharePoint service by running this 


url- (your SharePoint admin center admin URL) 


and then run this


Invoke-SPOSiteSwap -SourceUrl -TargetUrl -ArchiveUrl





what this does is this


Archives the existing site at to and moves to A site redirect will be created at that will redirect any requests to



hi @Matti Paukkonen  not sure my email got through to you regarding the Teams meeting. Can we arrange a time to do this as it would really help!



Hi @Cissong 

Thanks for the advice. I think i managed to run the code you sent, however i came up against an error and i'm not sure how to solve it? See attached image.





You seem to have en extra space on your Archive URL, right after https://

hi@Matti Paukkonen and everyone that helped.

Thanks I now have a larger set of IT skills and the start of my School's Sharepoint site! Thanks again.