Export (0) Print
Expand All

Deploy authored site elements (SharePoint Server 2010)

 

Applies to: SharePoint Server 2010

Topic Last Modified: 2011-08-05

This article discusses the deployment of authored site element customizations in Microsoft SharePoint Server 2010, including deployment procedures, general considerations, and best practices related to deploying custom content.

In this article:

Authored site elements can be thought of as the "content" in your sites. They are the Web pages, images, layout pages, cascading style sheets, and other resources that compose your SharePoint Server 2010 Web site. Authored site elements include:

  • Artifacts   These are site elements — typically authored by using a design tool such as Microsoft SharePoint Designer 2010 — that compose the framework in which your site's content appears. Examples of artifacts include master pages and layouts.

  • Web content   These are site elements — typically authored directly in the Web browser or in a client authoring program such as Word 2010 — that supply the content of your site. Examples of Web content include Web pages and images.

This article does not discuss deployment of developed site elements such as Web Parts and other code. For more information, see Deploy solution packages (SharePoint Server 2010) and Deploy templates (SharePoint Server 2010).

Authored site elements can be deployed by various methods:

  • Content deployment is a built-in system that enables you to create content deployment jobs in the Central Administration Web site. Content deployment is intended for regularly updating content or moving content to a destination site collection.

  • Use the object model to handle scenarios such as writing scripts to automate common tasks and setting custom properties for export and import that tailor the deployment. The object model provides the most control over your data migration scenarios.

  • Content deployment packages are intended for a one-time move or migration of content to a destination site collection. Content deployment packages are CAB files that can contain part or all of the authored site elements in a Web site, and can be deployed in a disconnected environment. Windows PowerShell cmdlets are used to create content deployment packages.

noteNote
This article does not discuss using solution packages to deliver your custom SharePoint Server 2010 development work to the front-end Web servers or the application servers in your server farm. By using solution packages, you can deploy artifacts in a disconnected environment, and you can deploy artifacts and developed site elements in the same package. For more information, see Deploy solution packages (SharePoint Server 2010).

The content deployment feature in SharePoint Server 2010 provides a simple and effective method of automating the deployment of content from one farm to another. You can also use content deployment to move artifacts and content between a staging environment and the production environment in a scenario where content is staged before it is published.

You can use the content deployment feature to deploy authored site elements in one or both of the following scenarios:

  • Connected environments   The content deployment feature can only be used in a connected environment — that is, in an environment in which the source and destination farms can communicate over a network.

  • Automated environments   If you want to automate the deployment of authored site elements from one server farm to another, the content deployment feature provides a built-in system for setting up automated deployment jobs.

The content deployment feature can be used to deploy authored site element customizations between an authoring site and multiple target sites. A best practice is to deploy customizations between the authoring site and the staging site or pilot environment. If you verify through testing that all site elements function as expected in network and security conditions that match the production environment, you can deploy the customizations from the authoring site to the production environment.

noteNote
Content deployment is always one-way. It is a "single master" system that always moves from a source farm or site collection to a destination farm or site collection.

For general guidance about how to plan to use content deployment with your SharePoint Server 2010 sites, see Plan content deployment (SharePoint Server 2010).

You can use content deployment packages to deploy authored site elements in one or more of the following scenarios:

  • One-time content migration   Use a content deployment package to move content to a destination site collection only once. If you plan to update content regularly on a destination site collection, use the content deployment feature or the Content Migration API.

  • Disconnected environments   If the farms are disconnected, you can create a content deployment package for asynchronous transfer to the integration farm.

  • Sample content   If authored site element customizations need to be deployed from the authoring environment to the integration environment to be used as samples for development purposes, you can use a content deployment package to simplify this process.

To eliminate potential synchronization issues, you must often deploy developed site elements before you deploy authored site elements. Farm solutions and Web application solutions must be installed and deployed to the destination farm prior to content deployment. Also be aware that you must install on the destination server any language packs that are in use on the source server; if you fail to install the required language packs, content deployment will fail.

Before performing the procedures in this article, familiarize yourself with the concepts related to the deployment of site element customizations. For more information about planning and designing sites and site collections, see Fundamental site planning (SharePoint Server 2010). Also, download an Excel version of the Content deployment planning worksheet (http://go.microsoft.com/fwlink/p/?LinkID=167835).

You can deploy content by using content deployment jobs between farms that are connected by a network. In many customization environments, content deployment jobs are run at regular intervals between farms. For example, every night a content deployment job may deploy all customizations that were developed on the authoring farm to the integration farm. This frees the authors and authoring farm administrators from the responsibility of manually migrating customizations, and you can time the migration to coincide with deployment of customizations from the developer workstations to the integration farm to ensure that customizations are deployed in the appropriate order.

Perform the following procedure to configure automated content deployment.

To configure automated content deployment
  1. On the destination server farm, create an empty site to receive the initial content deployment job. Do not apply a template to the site that you create. In SharePoint Server 2010, you cannot deploy content to a site that has had any blank template applied to it.

  2. On the destination farm, on the Content Deployment Settings page in SharePoint Central Administration, configure the farm to accept incoming deployment jobs, assign a front-end Web server as the import server to manage incoming deployment jobs, and specify whether to require encryption on the connection between the source and destination farms.

  3. On the source farm, on the Content Deployment Settings page, assign a Web server as the export server to manage outgoing deployment jobs.

  4. On the source farm, on the Manage Content Deployment Paths and Jobs page in Central Administration, create one or more deployment paths.

  5. On the source farm, on the Manage Content Deployment Paths and Jobs page, create one or more deployment jobs for each path.

  6. Run the initial deployment job to initiate the content on the destination farm.

  7. If the path does not deploy all security information, you should replicate the source farm's users, SharePoint groups, and permissions on content and sites on the destination farm.

For more information about how to plan for automated content deployment, see Plan content deployment (SharePoint Server 2010).

Most deployment scenarios can be accomplished by using Central Administration without the need for scripts. However, you can use the object model to handle other scenarios, such as writing scripts to automate common tasks and setting custom properties for export and import that you cannot configure you set up a deployment by using the SharePoint Central Administration site. You can also create code that exports and imports a content package in situations where connectivity between a source farm and a destination farm may be limited or unavailable.

For more information about content migration and the content migration APIs, see Content Migration Overview (http://go.microsoft.com/fwlink/p/?LinkId=187033). For an overview of the content deployment feature and the background and resources necessary to build and implement custom deployment solutions, see Deploying Content Between Servers (http://go.microsoft.com/fwlink/p/?LinkID=181466). For a code example that shows how to use the object model to create paths and jobs that deploy content between site collections, see How to: Deploy Content Between Servers (http://go.microsoft.com/fwlink/p/?LinkId=187034). For a code sample and information about how to export and import a content package by using the Content Migration API, see How to: Customize Deployment for Disconnected Scenarios (http://go.microsoft.com/fwlink/p/?LinkID=181076).

You can use Windows PowerShell to create a content deployment package that contains the authored site elements for a whole site (including all the content in the site) or a list or a document library.

noteNote
Use content deployment packages for a one-time migration of content to a destination site collection. Use the content deployment feature or the Content Migration API to periodically move content from a source site collection to a destination site collection.

Content deployment packages are implemented as CMP (Content Migration Package) files. You export this package from the source server, and then import it into the destination server. You can use this method of content deployment in both connected and disconnected environments.

If you are using a software configuration management system, follow the steps for exporting the content deployment package, and then use the procedure appropriate to your software configuration management system to save the exported file.

To create a content deployment package by using Windows PowerShell
  1. Verify that you meet the following minimum requirements: See Add-SPShellAdmin.

  2. On the Start menu, click All Programs.

  3. Click Microsoft SharePoint 2010 Products.

  4. Click SharePoint 2010 Management Shell.

  5. At the Windows PowerShell command prompt, type the following command:

    Export-SPWeb -Identity <URLname> -path <ExportFileName> -IncludeUserSecurity -IncludeVersions 4 -NoFileCompression
    

    Where:

    • <URLname> is the site to export. This site is written to the content deployment package together with all the subsites beneath it.

    • IncludeUserSecurity causes the new site to have the same permissions as the original site.

    • IncludeVersions is set to 4 to specify that all versions should be included.

    • NoFileCompression causes the content deployment package to be output to an uncompressed folder instead of a single CAB file. This makes it more complicated to deploy the deployment package to a different server, but makes it easier to edit the individual files.

For more information, see Export-SPWeb.

noteNote
We recommend that you use Windows PowerShell when performing command-line administrative tasks. The Stsadm command-line tool has been deprecated, but is included to support compatibility with previous product versions.
To import a content deployment package by using Windows PowerShell
  1. Verify that you meet the following minimum requirements: See Add-SPShellAdmin.

  2. On the Start menu, click All Programs.

  3. Click Microsoft SharePoint 2010 Products.

  4. Click SharePoint 2010 Management Shell.

  5. At the Windows PowerShell command prompt, type the following command:

    Import-SPWeb -Identity <URLname> -path <ImportFileName> -IncludeUserSecurity
    

    Where:

    • <URLname> is the site that will be imported, together with all the subsites beneath it.

For more information, see Import-SPWeb.

noteNote
We recommend that you use Windows PowerShell when performing command-line administrative tasks. The Stsadm command-line tool has been deprecated, but is included to support compatibility with previous product versions.

Was this page helpful?
(1500 characters remaining)
Thank you for your feedback
Show:
© 2014 Microsoft