08 June 2008

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

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

No comments:

Post a Comment

Comments are moderated only for the purpose of keeping pesky spammers at bay.

SharePoint Remote Event Receivers are DEAD!!!

 Well, the time has finally come.  It was evident when Microsoft started pushing everyone to WebHooks, but this FAQ and related announcement...