Take the 2-minute tour ×
SharePoint Stack Exchange is a question and answer site for SharePoint enthusiasts. It's 100% free, no registration required.

I create custom site, custom subsites, custom web parts, lists and I add some content. I'll save site as template and I include content.

Can I use this template in another SharePoint servers? Will it work, if I try to create site from this template?

Or do I have to always manually deploy solution and rebuild it by hand.

share|improve this question
add comment

2 Answers

up vote 1 down vote accepted

You will need to install custom solutions like web parts, rest should work fine.

share|improve this answer
    
Also make sure the patching level of the farm servers are the same (SharePoint patches) –  Robert Lindgren Feb 25 at 13:58
add comment

As long as the farm & web app you're creating the site on is the same build version and has the same feature IDs as the original location, the site template should work. Since "sharepoint-foundation" is one of your tags, I'm assuming this is on SharePoint 2010, so here are some additional notes:

Keep in mind that a site which was upgraded from MOSS 2007 will have some hidden features which don't show in the features list. If your original location is an upgraded site and your destination is a new SP2010 site, you'll need to manually remove the upgraded features from the site before saving it as a template.

There are several methods of getting the full features list for a given site, but here is the Powershell script I used:

$allSiteFeatures = Get-SPFeature | Where-Object { $_.Scope -eq "Site" }
$activeFeatures = Get-SPFeature -Site "http://siteURL/site"

$allSiteFeatures | ForEach-Object {
$active = $false
    foreach($feature in $activeFeatures)
    {
      if($feature.Id.ToString() -eq $_.Id.ToString())
      {
         $active = $true
      }
    }
    if(!$active)
    {
       $_.DisplayName
    }
}

Just save that in a text file named "site-features.ps1" (or something similar) on your server, update the URL to your own site's address, then open the SP2010 Powershell console and run it. You may want to output the results to a text file so you can easily refer back to the IDs for each feature. You can do the same thing for your destination site if you want to compare the two.

Once you have that list of features, you can manually remove whichever ones you want via the PS console or STSADM.

share|improve this answer
    
Also, as Nadeem said in his answer, any custom solutions or functionality will need to be installed on the destination server/site as well. –  Omegacron Feb 25 at 14:04
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.