---
schema_version: "1"
id: d9df3ce560144eb3ecbd8008a671287418c531706e2732681112c18dce8ebe53
title: Use the Metadata API to Deploy a Site
collection: admin
version: current
locale: en-us
portal_url: https://docs.salesforce.com/admin/current/en-us/platform/264-0-0/siteforce_website_api_overview.md
canonical_url: https://help.salesforce.com/s/articleView?id=platform.siteforce_website_api_overview.htm&release=264.0.0&type=5
source_site: help.salesforce.com
content_type: documentation
content_hash: 4801942766adeca7d32f924bf171ee5f715cfd447419c22edc7c44f75ac3c211
description: As a user, you can migrate a site from sandbox to production. You can use the Metadata API to create a deployable package for Site.com sites and Site.com Communities sites.
products:
  - Salesforce Platform
  - Security
release: "264"
---
# Use the Metadata API to Deploy a Site

As a user, you can migrate a site from sandbox to production. You can use the Metadata API to create a deployable package for Site.com sites and Site.com Communities sites.

### Required Editions

<table class="slds-table slds-table_bordered slds-max-medium-table_stacked slds-m-bottom_small edition">
        <colgroup>
          <col>
        </colgroup>
        <tbody>
          <tr class="">
            <td class="slds-cell-wrap" style="vertical-align:top;">Available in: Salesforce Classic</td>

          </tr>
          <tr class="">
            <td class="slds-cell-wrap" style="vertical-align:top;">
              <p>Available for purchase in: <strong>Enterprise</strong>, <strong>Performance</strong>,
                and <strong>Unlimited</strong> Editions</p>
              <p style="margin-bottom:0;">Available (with limitations) in:
                <strong>Developer</strong> Edition
              </p>
            </td>

          </tr>
        </tbody>
      </table>

![Note](https://sf-zdocs-cdn-prod.zoominsoftware.com/tdta-platform-extend_click-264-0-0-production-enus/5f7d9219-b7b1-4552-8891-f1aba9b289fc/images/icon_note.png)

Note For information on deploying a Lightning community or a Salesforce Tabs + Visualforce community, see [Deploy a Community from Sandbox to Production](https://help.salesforce.com/s/articleView?id=experience.networks_migrate_overview.htm&type=5&language=en_US).

There are several tools that you can use to create a package:

- Change sets (for Site.com and Site.com Communities sites only). The component type is called Site.com.
- Lightning Platform Migration Tool for Ant, which works for creating all site types. The metadata type is called `SiteDotCom`.

If using change sets, select Site.com from the list and follow the prompts to create your package. If using Lightning Platform as your tool, you must create a package.xml file. That file is submitted to the Metadata API to create a package.

![Note](https://sf-zdocs-cdn-prod.zoominsoftware.com/tdta-platform-extend_click-264-0-0-production-enus/5f7d9219-b7b1-4552-8891-f1aba9b289fc/images/icon_note.png)

Note You can include a Guest User Profile in your package.xml file. If you do so, that Guest User Profile is linked to the site during deployment.

The packaging process generates a folder that contains a content file and a metadata xml file. The content file name is \[sitename\].site. The metadata .xml file name is \[sitename\].site-meta.xml.

If you deploy a package that doesn’t include a .site file, an empty site is created. If the package contains a site file, and the organization already contains a site with the same name, the site is updated.

![Note](https://sf-zdocs-cdn-prod.zoominsoftware.com/tdta-platform-extend_click-264-0-0-production-enus/5f7d9219-b7b1-4552-8891-f1aba9b289fc/images/icon_note.png)

Note There is a file size limitation when using the Metadata API to deploy a site from sandbox to production. The assets in the .site file can’t be larger than 40 MB. The site gets created, but the assets show in the new site as broken. To fix the assets, export the assets from the sandbox environment separately and then import them into your new site.

For help with the Metadata API, see the Metadata API Developer Guide. You can find help for change sets in Salesforce Help and for the Migration Tool Guide at [https://developer.salesforce.com/page/Migration\_Tool\_Guide](https://developer.salesforce.com/page/Migration_Tool_Guide).

- **[Sample Package.xml Files](https://help.salesforce.com/s/articleView?id=platform.siteforce_website_api_samples.htm&release=264.0.0&type=5)**  
    Here are some sample Site.com package.xml files.

#### See Also

- [Change Sets](https://help.salesforce.com/s/articleView?id=platform.changesets.htm&type=5&language=en_US)
- [Sample Package.xml Files](https://help.salesforce.com/s/articleView?id=platform.siteforce_website_api_samples.htm&release=264.0.0&type=5 "Here are some sample Site.com package.xml files.")