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.
A community is composed of three metadata types:
- Network: Metadata type that contains the community’s settings.
- CustomSite: Metadata type that includes information about the page such as the domain, the URL and the settings.
- SiteDotCom: Metadata type that contains the site’s layout.
To deploy the metadata from one org to another, you can use Copado Change Management 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 Change Management 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 Change Management application to commit and deploy just the changes you want to make following the same steps as above.