Creating Publishing Site at SharePoint Online Root

Root Site

This requirement keeps on appearing every now and then that customers want their SharePoint Online root site collection to be based on Publishing Site Template instead of the default team site template that we get with Office 365 tenant.

What’s the Problem

When a new Office 365 tenant is created, the SharePoint online site gets a root URL like https://<tenant name>.SharePoint.com, which forms the entry point of the SharePoint online sites. By default, this site is based on team site template but most customers would prefer this as a publishing site so that they can create and nicely arrange multiple publishing pages.

First Attempt

You would think, why not just delete and recreate the site collection based on “publishing site” template. Well, as easy it may sound, it isn’t. Why, because having SharePoint online root site based on publishing site template is not “Supported” by Microsoft, well yet. Take a look at this article.

So, even if you attempt to do so, you will either end up with a Wiki site or the newly created site just won’t appear in the list of site collections, leaving you wondering what happened.

In my case, I deleted the root site collection from SharePoint Online Admin Center. I could see the site in the recycle bin but there is no option on the UI to delete it from there. Only option we get there is to “Restore Deleted Items”.

Recycle Bin

Anyway, I went ahead to recreate this root site collection. After filling in the new site collection creation form, when I clicked OK, it popped up messages in Red and gave me the option to delete the site collection permanently from recycle bin.

Recreate Root Site

Well, I did so too and then tried to create again. When I was choosing the Publishing Site from the list of site templates in the admin portal, it was allowing and was showing a message like “it might take upto 15 mins…”, but after a few seconds that message would disappear and nothing else would happen. That root site never appeared again. I even tried selecting team site template then, still ended up with same issue.

Apparently, something was stuck somewhere.

PowerShell to Rescue

After a few attempts, I decided to use PowerShell to ensure the root site was deleted properly.

[code lang=”js”]
Connect-SPOService -Url https://<tenant>-admin.sharepoint.com

Remove-SPODeletedSite -Identity https://<tenant>.sharepoint.com
[/code]

The remove-SPODeletedSite will remove the site by recycle bin, if apparently, even from any other hidden locations.

You can try the command again to confirm the site really doesn’t exist anymore. You should get an error message this time.

Delete Site

Create Root Site Collection

Now that we have got rid of our old root site collection, it’s time to try n recreate.

So, go to SharePoint Online Admin Portal and under Site Collections, Click on New and then Private Site Collection. Fill out the form, but this time, instead of selecting the site template as “Publishing Site”, choose “Select Template Later” under Custom tab and click OK.

Create Empty Root Site

This time, you can see the progress and the site collection should get created within a few minutes.

After the site collection gets created, browse the site and you will see the template selection screen first. Select “Publishing Portal” from under Publishing Tab and click OK.

Select Template Root Site

And now all you have to do it “wait”. It might take upto 15 mins, before the template gets applied and then you can enjoy the publishing site as root of your SharePoint Online tenant.

Root Site

Note: I have not verified, whether this workaround is supported by Microsoft or not.

Enjoy,
Anupam

You may also like

4 comments

  1. what should be my root site where i can create site columns so that it propagates to all my sharepoint sites

    1. To propogate Site columns and Content types to all site collections, you need to create those under the default content type hub – https://.sharepoint.com/sites/contenttypehub. This is the content type hub created by default in SharePoint Online and cannot be changed. You then need to add the site columns to any content type and publish that content type to propogate all site columns to other site collections.

Leave a Reply

Your email address will not be published. Required fields are marked *