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
| Available in: Salesforce Classic |
Available for purchase in: Enterprise, Performance, and Unlimited Editions Available (with limitations) in: Developer Edition |
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.
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.
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.
- Sample Package.xml Files
Here are some sample Site.com package.xml files.

