While you can create a Salesforce Community using the Community Builder directly in your production environment, I would not recommend it in the majority of cases. Fortunately, it is quite easy to deploy your templates into production by following these three simple steps:
Step 1: Use Change Sets
Use change sets to move all custom lightning components you are referencing in the community from the sandbox to production, as well as any metadata that you set up outside of the Community Builder (welcome email templates, workflow rules, profiles, permission sets, etc).
If you skip this step, it will still allow you to deploy the community and will appear to be successful, but you will see an internal server error in the Community Builder and will not be able to make any updates until you have moved the missing components into production.
I highly recommend creating a deployment template and filling it in as you build your community to ensure nothing is forgotten at the time of deployment; it is an important part of our methodology at Perficient and ensures smooth deployments.
Step 2: A Little Navigation
From your sandbox, navigate to the Site.com Studio and locate the toolbar. Click the arrow next to the widget icon and select to ‘Export This Site’ from the sandbox. Then go into production and create a new community, selecting the same version of the template; going from a Spring ’16 Napili template in sandbox and moving Winter ’16 production environment will not work. You need to go from Winter’ 16 in sandbox to Winter ’16 in production. All customization performed inside the Community Builder will move over
Step 3: Update Admin Settings
Go to the Community Management console and update your administrative settings, topics, moderation criteria, etc. as these do not carry over automatically.
You can use this process to move the community between sandboxes doing the same thing, if a multi-step deployment is part of your change management process. You could also use it to effectively clone a Community, as well.
You may want to do this if you are looking to create a similar community with different users. For example, you might want to have a separate community for French users that looks like your English community, but does not mix French and English conversations in the same community as that can be confusing.
Spring ’17 Update: The navigation inside of the builder has changed since this blog was originally written. To get to Site.com Studio from the builder, you now need to go to Settings > Languages > Go to Site.com Studio Languages.
Summer ’17 Update: Salesforce has introduced a way to move communities between orgs using change sets. For more information, please review the Summer ’17 Release Notes.
Winter ’18 Update: Try following our proven framework for setting up a Salesforce Customer Service Community with the interactive workbook below.
I have followed the same steps for deploying the napili template community between 2 sandboxes with same version.
1. Exported from sandbox1.
2. Created the community with same template in sandbox2 and imported/overwritten site with Exported file(.site) from previous step. I am able to see my pages after overwriting the site.
3. publish the changes done in step 2.
4. When I open community builder I an see the community pages but nothing is loading in output pane. No lightning components are visible on left hand side bar. I can see the lightning components in sandbox, developer console etc. but they are not available in community builder (they are implementing forceCommunity:availableForAllPageTypes).
Any idea what might be the glitch or missing part here. Also when I create another community then those components are visible there for drag and drop.
Thanks
Jai
Hi! So glad to have found this article as this is not documented by Salesforce that I can find.
Once I’d created my community in production, I had to go to Site.com Studio, select ‘Overwrite this Site’ from the widget icon, and select the file I’d exported from the sandbox. That seemed to be the step that brought everything over.
Thanks – this saved me quite a bit of time!
This was so simple yet this knowledge is not very common or easily available. Salesforce documentation doesn’t provide any insights into deploying community templates either. This was very helpful. Thank you!
Thanks for the feedback, Ravi! I am glad this was useful!
Hi Jai, I know this is a bit late, but that sounds a bit like a bug. If you deployed the lightning components to the new org and then uploaded the .site file to bring over your customization from the previous environment, the components should show up.
It appears this no longer works for Winter ’17. Any updates for new releases? Site Export functionality does not seem to work this way any more…
Brent, thanks for reminding me to update this. To get to Site.com Studio from the builder, you now need to go to Settings > Languages > Go to Site.com Studio Languages.
Hi Kara, Site Export functionality is no longer working in Summer’17. Any idea if something new was released to move site templates between sandboxes.
Hi Estela,
Great question! Yes, this has now been replaced with the ability to migrate in between sandboxes using change sets.
I have created a salesforce lightning community using ‘Partner Central’ template and some lightning components in one of my developer org and need to deploy this community and components to another org.
I used ANT migration tool to deploy the meta-data (i.e lightning components and community configuration settings) between orgs.
While deploying the data to another org I changed the domain name in networks file to new domain name of the new org. I deployed the data successfully and all my community configuration settings are visible in the new org. When accessing the community through builder in the new org it seems fine and while preview all the components work well, but when I use the public URL to visit the community it shows
“An internal server error has occurred” with some different Error Id’s each time.
I also tried the site export feature from the Site.com studio and overwriting the site file in new community, but this also leads to same error.
This works well when I configure the community manually and publish it through builder, but that is not what I wanted. I want this process to be automated as I need to deploy this community to various orgs.
Please help me out in this.
Since the Summer ’17 release came out with the ability to deploy the Network object, I have not tried deploying a new community between orgs using ANT. After deploying it via ANT, are you going into the builder and clicking publish? Even after a sandbox refresh, you have to republish the community inside of the builder, which is counter-intuitive.