How to Deploy a Community
Migrating communities from one environment to another is a complex process that involves some manual steps. In this article we will provide useful insights into the deployment of a community to production with Copado, using the Metadata API.
First of all, if you are deploying a community to an org for the first time, you will need to enable communities in that Org. To do this, follow the steps below:
- Navigate to Setup.
- Go to Feature Settings and click on Communities.
- Click on Communities Settings and enable the Enable communities checkbox.
- Enter a Domain name and click on Save.
The following metadata types combine to define a site.
- Network—Represents an Experience Cloud site. Contains administration settings, such as page override, email, and membership configurations.
- CustomSite—Contains the domain and page setting information, including indexPage, siteAdmin, and URL definitions.
- ExperienceBundle or SiteDotCom—If you’re deploying an Experience Builder site, we recommend using ExperienceBundle instead of SiteDotCom. ExperienceBundle provides text-based representations of the different Experience Builder settings and site components, such as pages, branding sets, and themes, that make up an Experience Builder site.
To deploy the metadata from one org to another, you can use Copado Developer application.
- Manually create the new community in the target org with the same parameters (domain, name, template)
Note: When you create a new community, there are a few default pages that are provided by Salesforce such as login, self-registration, change password, forgot password and home pages. The look and feel of these pages will vary depending on the template you choose to create the community, but you can customize them as you wish.
- Use Copado Developer application to retrieve the different metadata types and deploy them from one org to another.
- Create a User Story record and commit the metadata types.
- Check the Promote & Deploy checkbox. Copado will trigger the creation of a Promotion and a Deployment record and will execute the deployment.
If you just want to implement some changes in a community you have previously created, you can use Copado Developer application to commit and deploy just the changes you want to make following the same steps as above.
In the Salesforce documentation Deploy Your Experience Cloud Site with the Metadata API you will find Tips and Considerations that might be useful when deploying communities.