A quick heads-up – if you remove the root site (or RootWeb, like it’s called in the code) of your classic SharePoint Site Collection, that’s going to cause you some grey hairs. Whereas you can always restore a normal site from the site collection recycle bin, the root site you can’t. You actually can’t access the recycle bin after removing the root site, nor can you make magic happen with PowerShell commandlets anymore.
The Recycle Bin would be located at a URL like this: https://<yoursite>/_layouts/15/AdminRecycleBin.aspx, but after the site is removed, it won’t be there.
If you actually just wanted to get rid of your site collection by removing the site (see below), in SharePoint Online, you’re out of luck again. Removing a root site (or a root web, as you can also call it) from a SharePoint Site collection seems to be a weird “worst-of-both-worlds” kind-of-action – you can’t administer or even access the site collection anymore, but you can’t restore it through the UI either (it doesn’t show as removed in SharePoint Online’s site collection listing, or in “Deleted sites” in the new Admin Center! Basically, you now still have the site collection, just without any sites in it. You can’t even reuse the URL for anything, as it’s still reserved for your site collection!
I actually managed to get into an unrecoverable state by doing this, and tried to recover the site I removed. That didn’t go well! See this post for a cautionary tale about relying on the backups after Restore-SPODeletedSite got stuck: https://www.koskila.net/2018/05/21/caution-sharepointonline-backups/
Okay – so what are the steps I should never take?
Browse to root site > Site Settings > Site Actions > Delete this site
It will say this (see below), which is technically true, but doesn’t help us much…
In SharePoint 2013, the action of removing the root site was apparently functionally equivalent to removing the site collection (see this blog post for more info). But this is not true for SharePoint Online.
Wait – I want my site back!
Whoops, you weren’t actually supposed to remove that site? And now you’re in trouble since you can’t restore it from anywhere? No worries – happens to the best of us!
At least for me the good old “Restore-SPODeletedSite” did nothing. It can (usually) restore site collections, but didn’t seem to have much success with a root site. You can still try it, but for me it just hung and never finished. Or you might just get the empty root site back – that seems to happen every now and then!
If you want to get your site back and you’re on SharePoint Online, you need to move fast. Microsoft stores 14 days worth of backups for your site, and since the typical procedure for site restore takes 7-10 days, you don’t have any time to waste. Open a support ticket for site restore from your Admin Center ASAP!
I just wanted to get rid of the whole Site Collection
If you want to start from the scratch with your site, but don’t want a new URL, don’t try removing the root site. Recreate the whole site collection instead – see below for instructions!
The right way to remove the site collection is by either doing it programmatically, by using PowerShell or by going to Central Administration (if on-premises) or SharePoint Administration (if using SharePoint Online) and use the GUI to actually remove your Site Collection. See the screenshot below. For an article about this on SPO, see this.
After deleting the site collection, and removing it from the recycle bin (see this for more info on how to do that!), you can then recreate the site collection with the URL that was reserved to it before.
If you didn’t remove the root site, but rather a subsite (or a “subweb”), they’ll be in the site collection recycle bin. See this article for more information: https://sharepoint.stackexchange.com/questions/173481/sharepoint-2013-deleted-subsites-not-going-in-recycle-bin
Latest posts by Antti K. Koskela (see all)
- Fastest way to verify your Client Id and Client Secret are valid with PowerShell - August 9, 2018
- How to get the user count for Azure AD Enterprise Application - August 1, 2018
- Solving “Tenant app deployment is only supported in the app catalog site. The current site is not the app catalog site.” error - July 31, 2018
- Solving “Sorry, your files couldn’t be uploaded. The upload might be too large or the server might be experiencing high network traffic.” in SharePoint - July 24, 2018