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:

  1. Navigate to Setup.
  2. Go to Feature Settings and click on Communities.
  3. Click on Communities Settings and enable the Enable communities checkbox.

    User-added image
  4. Enter a Domain name and click on Save.
Note: Make sure you use the same domain name you used in your sandbox to avoid errors.

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.

  1. 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.
  2. Use Copado Developer application to retrieve the different metadata types and deploy them from one org to another.
    1. Create a User Story record and commit the metadata types.
    2. Check the Promote & Deploy checkbox. Copado will trigger the creation of a Promotion and a Deployment record and will execute the deployment.
    Tip: You can leverage Copado’s environment variables feature to deploy URL sites from one environment to another. For more information, please check out the article Environment Variables.
Deploying Changes to an Existing Community

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.

 


How did we do?