So, you’ve provisioned a new SharePoint online tenant, and would like to replace the Team Site at the root URL with a site using the ‘Publishing Portal’ template. Seems reasonable, right?

[Update]
I came across an Office 365 Community post where an alternative approach was suggested that involved creating the Site Collection and choosing the < Select template later.. > option. This actually does work, creating the root web using the Publishing Portal template.The resulting site still has issues however. I was still unable to configure managed navigation, or restrict the page layouts. Trying to perform these actions simply results in the message “Sorry, you don’t have access to this page”. Another Office 365 Community post talks about a solution to this problem, but the change in settings requires 24 hours to take effect. I’ll try this and see how it goes.
A colleague and I had the same idea, and set to work re-creating the Site Collection at the root URL. The first thing that I noticed was that you can’t create a Site Collection at the root URL using PowerShell. Some quick Googling with Bing revealed that this is a known limitation at the present point in time.

We went back to the UI to create our Site Collection at the root URL, but even after selecting the ‘Publishing Portal’ template, the site was being created with the ‘Enterprise Wiki’ template instead! We re-created it three times, with the same result each time. Here you can see the template used with a quick call to Get-SPOSite in PowerShell, piping the site to Format-List to show its properties:

By this time, we stopped doubting our ability to select the right template in the UI. We knew that SharePoint Online was doing something funny in the background. That’s when I came across the following KB article: A newly created SharePoint Online site uses the Enterprise Wiki template instead of the Publishing Portal template. Unfortunately, it doesn’t explain why this limitation exists, only that it does exist. With our Enterprise Wiki Site Collection, we thought we could just turn on the missing publishing features and continue to use the site. Unfortunately we came across a few other limitations, such as the inability to specify which Page Layouts can be used under Page Layout and Site Template Settings. Attempting to add a Page Layout or allow any page layout to be used results in the ‘Sorry, you don’t have access to this page’ message. In the end, we decided to use a redirect page to redirect to an actual Publishing Portal in a different Site Collection, under the /sites/ managed path.
What do you mean by “restrict the page layouts” when using the method of choosing template later? I want to create a custom Page Layout so does it work for me to create a Publishing Portal as the root site collection? I don’t need managed navigation.
Hi Valleyma,
Regarding restriction of page layouts, I was referring to the ability to configure which page layouts are able to be used in the site. This is a setting in Site Settings which allows you to restrict which page layouts and site templates can be used within the site, and its sub sites. More info is available at https://support.office.microsoft.com/en-au/article/About-page-layout-and-site-template-settings-1acbb881-269b-4e1b-86cc-8644bfffe40b#bm3.
If you need to create Page Layouts or otherwise customise the UI, you could also use the Enterprise Wiki template which might save you some headaches.
Cheers, Daniel