To deploy Experience Cloud site metadata, retrieve the site's bundle with its Network and CustomSite metadata, validate and deploy it to the target org, then publish. Aura and older LWR sites use ExperienceBundle, while enhanced Lightning Web Runtime (LWR) sites use DigitalExperienceBundle and DigitalExperienceConfig.
Deployment isn't the final step. Per the Salesforce CLI reference, publishing pushes your changes to the live site, so plan it as its own step.
What is an ExperienceBundle in Salesforce Experience Cloud?
Salesforce Experience Cloud sites are branded spaces for employees, customers and partners, whether communities, sites or portals, such as a Help Center that shares articles from your knowledge base. ExperienceBundle is a text-based version of the settings, pages, branding sets and themes that make up an Experience Builder site.
The Metadata API Developer Guide says it's stored as .json files under an experiences folder, with brandingSets, config, routes, themes, variations and views folders for each site. Experience Cloud still uses the term Communities in its configuration, such as the scratch org features list.
Before Summer '19 (API version 45.0 and earlier), Network, CustomSite and SiteDotCom defined a site, and SiteDotCom retrieved as a binary .site file that isn't human readable. JSON files show up in a diff, so site changes can go through the same version control and review as code.
Which metadata type does your site use?
The type depends on whether the site runs on Aura, LWR or enhanced LWR. This table maps each framework to its metadata, and Aura covers templates such as Customer Service and Partner Central, where you configure lead distribution and deal registration.
| Site framework | Metadata to deploy | What to know |
|---|---|---|
| Aura | ExperienceBundle, Network and CustomSite | Enable ExperienceBundle Metadata API in Setup's Digital Experiences settings first, or retrieves fall back to SiteDotCom |
| LWR (not enhanced) | ExperienceBundle, Network and CustomSite | LWR sites use ExperienceBundle by default, so no setting is needed |
| Enhanced LWR | DigitalExperienceBundle and DigitalExperienceConfig | API version 56.0 and later; the config holds workspace details for your organization, such as the site label, URL path prefix and workspace type |
Enhanced LWR is now the Salesforce Experience Cloud default: since Winter '24, any site created from an LWR template is an enhanced LWR site. In a Salesforce DX project, ExperienceBundle lives in an experiences directory and DigitalExperienceBundle in digitalExperiences/site.
How do you deploy an Experience Cloud site?
The steps below move tested changes from a sandbox to production with Salesforce CLI. Each part follows in order, and the infographic sums them up.

Enable the bundle and check both orgs
Before you retrieve an Aura site, enter Digital Experiences in the Setup Quick Find box, select Settings and then Enable ExperienceBundle Metadata API. After that, retrieve and deploy calls use ExperienceBundle instead of SiteDotCom.
Keep the source and target on the same Salesforce release, because deploying a site from a newer version to an older one isn't supported. The same guide notes that ExperienceBundle doesn't support managed packages.
Back up the site folder before you edit its JSON, which is the Metadata API guide's own tip. A refreshed sandbox that matches production gives you a fair place to test, and our scratch org vs sandbox guide covers the choice.
Retrieve the bundle with Network and CustomSite
Network represents the Salesforce Experience Cloud site itself, and its site field names the CustomSite associated with it. Retrieve both with the bundle, as in this manifest from the Experience Cloud developer guide, which uses * to retrieve every site:
<?xml version="1.0" encoding="UTF-8"?>
<Package xmlns="http://soap.sforce.com/2006/04/metadata">
<types>
<members>*</members>
<name>CustomSite</name>
</types>
<types>
<members>*</members>
<name>ExperienceBundle</name>
</types>
<types>
<members>*</members>
<name>Network</name>
</types>
<version>46.0</version>
</Package>Replace * with your site's name and set your orgs' API version, leaving SiteDotCom out of the manifest as the Metadata API guide warns. Navigation menus deploy as their own NavigationMenu type, available from API version 47.0.
Preview and validate
Run sf project deploy preview first: it lists the components that will be deployed or deleted, plus org conflicts where source tracking is on. Then run sf project deploy validate, which checks the deployment with Apex tests and returns a job ID without deploying.
Validation is also where test coverage fails: if an Apex component in the deployment has less than 75% coverage, the deployment fails. Even if your org's overall coverage is 75% or higher, the Apex components you deploy can still fall short.
Deploy, publish and activate
Pass the validation job ID to sf project deploy quick, which skips the tests and stays valid for 10 days. Then publish in Experience Builder or run sf community publish.
sf project deploy preview --manifest manifest/package.xml --target-org production
sf project deploy validate --manifest manifest/package.xml --test-level RunLocalTests --target-org production
sf project deploy quick --job-id <job ID> --target-org production
sf community publish --name "Customer Portal" --target-org productionPublishing a site for the first time makes its URL live, and publishing runs as an async job that times out after 15 minutes. Activation is a separate step: it sends the welcome email and is needed to set up SEO, and you set it through the Network status field or Administration settings.
What breaks Experience Cloud deployments?
Salesforce's guides document several ways a Salesforce Experience Cloud deployment can fail. This table pairs each one with Salesforce's documented fix.
| Problem | What to do |
|---|---|
| Upgrading the bundle to a later API version | ExperienceBundle can't cross API versions, so deploy at the old version, then raise package.xml and retrieve again |
| One site URL ends in /s and the other doesn't | To update a site, both URLs must match, so add or remove /s in the source bundle |
| Non-enhanced LWR site deployed to a target where the site was created first | Rename the target site and change both its URLs, then redeploy with Network and CustomSite |
| Translations in the target that aren't in the source | Add the variants to the source, or the DigitalExperienceBundle deployment fails |
| Menu items open blank pages on LWR templates | Create the object pages, because LWR templates don't include generic record pages |
The rename fix exists because you can't delete a Salesforce Experience Cloud site. Salesforce's developer guide recommends letting the deployment create the site in the target org instead of creating it there first.
Test and roll back the site
View the published pages as each audience would see them before you call the release done:
- Open public pages in a private browser window with no session, as a guest would
- Log in as a member of each profile the site serves and check pages and records
- Run self-registration, login and password reset end to end
- Check every navigation menu item and the branding on desktop and mobile devices
If a member can't see a page, check their profile and permission sets before you redeploy the bundle. Record pages inside Salesforce have their own deployment rules, covered in our post on Lightning record page assignments.
A rollback is a new deployment of the previous bundle followed by a republish, because publishing is the step that refreshes the live site. Keep that earlier version in source control or a backup before you deploy.
Which Flosum features help with site deployments?
Flosum's Overwrite Protection compares branch components with the live org and flags each Different one for review before you deploy. Our post on Salesforce overwrite protection shows a full job.
Its PreDeploy Fix lists each missing dependency with the component that references it, and Rollback uses the pre-deployment backup snapshot stored by the Deploy job. Flosum's DevOps platform checks changes against a dependency graph of your org.
Flosum DevOps runs in Flosum's cloud or in your own cloud. For release processes across several Salesforce orgs, see our guide to Salesforce Experience Cloud release management.
FAQs
How do I deploy an Experience Cloud site in Salesforce?
Retrieve the site bundle with Network and CustomSite, validate the package against the target org, deploy it and then make the changes live. Per the Salesforce CLI reference, each publish updates the live site with your latest changes.
What is the difference between ExperienceBundle and DigitalExperienceBundle?
ExperienceBundle covers Aura sites and LWR sites that aren't enhanced. Enhanced LWR sites use DigitalExperienceBundle with DigitalExperienceConfig, according to the Experience Cloud developer guide.
Why doesn't my Aura site retrieve as an ExperienceBundle?
Enable ExperienceBundle Metadata API in Digital Experiences settings. Once it's on, Metadata API calls and Salesforce DX operations switch from SiteDotCom to ExperienceBundle.
Can I deploy an Experience Cloud site with a change set?
Yes. With ExperienceBundle enabled, the change set lists two Site.com items, and the one ending in 1 represents the ExperienceBundle.
How do I roll back an Experience Cloud deployment?
Deploy the previous version of the bundle from source control or a backup, then republish the site. In Flosum, Rollback restores the components you select from the Deploy job's backup.
Book a demo to see Flosum compare and deploy Experience Cloud site changes between your Salesforce orgs.
Thank you for subscribing




