How do I? – Change the Site Template of a root site collection that has sub sites

Written by Cornelius J. van Dyk on . Posted in How Do I...

I was asked the following question in the support forums and thought it would be useful to blog about for others to use in the future.

Question: I created a new root site (site collection) and selected the wrong site template during the site creation process or I changed my mind and want to use a different site template than the one used during site creation. The problem is that sub sites have been created since then. How do I change the site template used for the root site of a site collection with sub sites?
Fellow MVP Shane Young blogged an article that comes closest to addressing this scenario here: http://msmvps.com/blogs/shane/archive/2006/02/15/83787.aspx Unfortunately, the scenario is based on WSS 2.0 and if you’re working with WSS 3.0, this might not work. So you are left having to either adapt Shane’s article to 3.0 or go with the simplest way possible which is the recreation of the site.  Microsoft’s conservative recommendation would be, as you already noted, to delete the site and then recreate it using the correct template. Since you have sub sites in this site collection, you will need to backup the sub sites BEFORE you can do this.  Of course, in the process of templatizing/backing up sub site, you could run into problems if you’re trying to save a site as a template and it exceeds the 10 MB limit.  Given that, I would recommend that you increase your site template site limit before templatizing sub sites.  Here are the steps I would recommend to resolve your issue:
  1. Schedule an outage of the sites and conduct this process off hours in order to ensure that nobody is making changes to the sites while you’re doing this.  COMMUNICATE this with your users clearly.  Users can get very testy about these things.  😉
  2. BACKUP YOUR DATABASE BEFORE YOU START!!!
  3. Increase your site template size limit.  Follow the instructions from this article: http://www.cjvandyk.com/blog/Lists/Posts/ViewPost.aspx?ID=111
  4. Templatize each sub site by using the “Save as Template” option on the Site Administration page.
  5. Clearly record the permissions for each sub site.
  6. Go to the site collection Site Template Gallery and download a local copy of all the site templates (.stp) to your computer.
  7. Delete each sub site.
  8. Delete the root site of the site collection.
  9. Create a new site collection, this time selecting the RIGHT template!  😉
  10. Go to the Site Template Gallery of the new site collection.
  11. Upload all the .stp files you downloaded in step 4.
  12. Each of the uploaded templates should now show up as options in the Create menu.  Recreate each site using its template in turn.
  13. Recreate the permissions for each site using the information captured in step 5.
  14. Navigate back to the site collection’s Site Template Gallery and delete all the .stp templates you uploaded in step 11.  This is to remove the sites as create options and is done for security reasons.
And that should do it! The hardest part of this process is capturing and re-establishing permissions on the sites, especially if your site administrators use fine grained permissions i.e. grant library, folder or item level permissions.  In such cases, it might not be possible to fully capture the complete permissions set without expending massive amounts of time. In cases where granular permissions are in play, I recommend leveraging an automated tool to backup the sites. AvePoint has a good tool that does a nice job of this called DocAve. You can download a 30 day trial of DocAve and use it if this is a onetime occurrence. Of course DocAve has many more features that might well make it worth owning for your environment. Luckily this kind of scenario doesn’t happen too often… right? 😉

Cheers
C




image

Tags: ,

Trackback from your site.

Cornelius J. van Dyk

Born and raised in South Africa during the 70's I got my start in computers when a game on my Sinclair ZX Spectrum crashed, revealing it's BASIC source code. The ZX had a whopping 48K of memory which was considered to be a lot in the Commodore Vic20 era, but more importantly, it had BASIC built into the soft touch keyboard. Teaching myself to program, I coded my first commercial program at age 15.

After graduating high school at 17, I joined the South African Air Force, graduating the Academy and becoming a Pilot with the rank of First Lieutenant by age 20. After serving my country for six years, I made my way back into computer software.

Continuing my education, I graduated Suma Cum Laude from the Computer Training Institute before joining First National Bank where my work won the Smithsonian Award for Technological Innovation in the field of Banking and Insurance. Soon I met Will Coleman from Amdahl SA, who introduced me to a little known programming language named Huron/ObjectStar. As fate would have it, this unknown language and Y2K brought me to the USA in 1998.

I got involved with SharePoint after playing around with the Beta for SharePoint Portal Server 2003. Leaving my career at Rexnord to become a consultant in 2004, I was first awarded the Microsoft Most Valuable Professional Award for SharePoint in 2005, becoming only the 9th MVP for WSS at the time. I fulfilled a life long dream by pledging allegiance to the Flag as a US citizen in 2006. I met the love of my life and became a private consultant in 2008. I was honored to receive my ninth MVP award for SharePoint Server in 2013.

Leave a comment

You must be logged in to post a comment.