Deploy Metadata Between Salesforce Orgs: 6 Methods Compared
To move metadata between Salesforce orgs you have six realistic options: change sets for related orgs and small changes, the Metadata API or Salesforce CLI for scripted and source-controlled deploys, DevOps Center for a guided pipeline, unlocked packages for modular apps, and org-to-org clone tools when you just want one org's configuration to match another's.
They are not interchangeable. The right one depends on whether your orgs share a production org, whether you track changes in Git, whether you need to delete things, and how much setup you're willing to do. Here's how each works and where it fits.
What are change sets and when should you use them?
Change sets are Salesforce's built-in, point-and-click way to send metadata from one org to another related org. You build an outbound change set in the source, upload it, and deploy the inbound change set in the target. Both orgs must be affiliated with the same production org and linked by a deployment connection.
They are fine for an admin shipping a handful of fields and a layout from a sandbox to production. The limits show up quickly: you add components one by one, there's no source control, you can't send a change set to an unrelated org, and you can't use them to delete or rename components — deletions are done by hand in the target.
How do you deploy with the Metadata API and package.xml?
The Metadata API is the engine underneath almost every other option. You describe what you want in a package.xml manifest (metadata type plus member names), retrieve those components from the source as files, and deploy them to the target. Deletions go in a separate destructive changes manifest.
Calling it directly is rare these days — most people drive it through Salesforce CLI — but understanding it explains the behavior of everything else: deploys are file-based, dependency resolution happens within a deployment, and test levels are a deploy option.
How does Salesforce CLI deploy metadata?
Salesforce CLI (sf) is the scriptable front end to the Metadata API and the standard for source-driven development. The core commands are:
sf project generate manifest --from-org <source>to build apackage.xmlfrom what exists in an org.sf project retrieve start --manifest package.xml --target-org <source>to pull the components into a local project.- Commit the retrieved source to Git and review the diff.
sf project deploy validate --manifest package.xml --target-org <target>to run a check-only deploy first.sf project deploy start --manifest package.xml --target-org <target> --test-level RunLocalTeststo deploy. Add--post-destructive-changeswith a destructive manifest to remove components.
Because it's all commands and files, it slots into any CI system and works between any two orgs you can authenticate to. The cost is that someone has to own the project structure, the manifests and the pipeline.
What about DevOps Center and unlocked packages?
DevOps Center is Salesforce's own guided release tool: work items move through pipeline stages backed by a Git repository, so admins get source control without living in a terminal. It's a good middle ground for teams outgrowing change sets. Salesforce has been moving customers to a next-generation version of DevOps Center, so check the current setup docs before you start.
Unlocked packages bundle metadata into versioned, installable units created from a Dev Hub. They suit teams that want to modularize a large org into separately versioned apps. Package versions must meet code-coverage requirements to be promoted to released, and upgrades can deprecate or delete removed components. The up-front investment — carving an org into packages and untangling dependencies — is significant.
How do the options compare?
| Method | Setup effort | Source control | Destructive changes | Test requirements | Best for |
|---|---|---|---|---|---|
| Change sets | Low | None | Not supported — delete manually | Enforced on production deploys | Small admin changes between related orgs |
| Metadata API (direct) | High | Up to you | Yes, via destructive manifest | Test level is a deploy option; enforced in production | Custom tooling |
| Salesforce CLI | Medium | Yes (Git) | Yes, pre/post destructive manifests | --test-level; enforced in production |
Developer teams and CI pipelines |
| DevOps Center | Medium | Yes (Git) | Varies — check current docs | Enforced on production deploys | Admin-heavy teams adopting source control |
| Unlocked packages | High | Yes | Via package upgrade options | Coverage required to promote a version | Modular apps, large orgs |
| Commercial DevOps release platforms | Medium | Yes | Usually | Enforced on production deploys | Teams wanting comparisons, rollbacks and approvals in one UI |
| Org-to-org clone | Low | No | Depends on tool | Enforced on production deploys | Making one org's config match another |
The row that applies to everything: production deploys that include Apex need at least 75% overall code coverage, all tests must pass, and every trigger needs some coverage. When you don't specify a test level, the Metadata API runs local tests by default for production deploys that contain Apex.
When does an org-to-org clone make sense?
A clone approach makes sense when the goal is "make this org look like that one" rather than "ship this reviewed change." Typical cases: bringing a long-lived sandbox back in line with production after months of drift, standing up a new sandbox or Developer org with the same automation and permissions, or syncing configuration between two orgs that don't share a production org and so can't use change sets.
It's the wrong tool for disciplined release management. If changes need review, approvals and a history in Git, use Salesforce CLI or DevOps Center, and treat clones as a way to reset environments. If the goal is understanding an org rather than syncing it, a written spec is often more useful — see how to document a Salesforce org for AI coding agents.
Where Syntharil Metadata Clone fits
Syntharil's metadata deployment is an org-to-org clone. You connect source and target over OAuth, pick from 28 supported metadata types — Apex, Visualforce, LWC and Aura, Flows, workflow and approval processes, validation and duplicate rules, record types, layouts and Lightning pages, custom labels and metadata, email templates, reports and dashboards, Profiles and Permission Sets — and run it. Sandbox targets get partial apply with no test run; production targets run all local Apex tests with per-group rollback. After the first run, re-runs are incremental per type, and deletions at the source propagate to the target. Custom objects and fields are handled by replication's schema harmonization rather than by the clone. There's no Git history, so it complements a source-controlled pipeline rather than replacing one.
Bottom line
Use change sets for small changes between related orgs, Salesforce CLI for anything you want in Git and CI, DevOps Center if your admins need source control without a terminal, and unlocked packages when you're ready to modularize. Reach for an org-to-org clone when the job is aligning environments, not releasing changes. Whatever you choose, validate before you deploy to production and budget for the 75% coverage gate.
FAQ
Can I use change sets between two unrelated Salesforce orgs?
No. Change sets only move between orgs affiliated with the same production org, connected by a deployment connection. For unrelated orgs, use the Metadata API, Salesforce CLI, packages, or an org-to-org tool.
How do I delete metadata from a target org with a deployment?
Include a destructive changes manifest (destructiveChanges.xml, or its pre/post variants) alongside package.xml in a Metadata API or Salesforce CLI deployment. Change sets can't delete components.
Do I need to run Apex tests when deploying to a sandbox?
No. Test runs are optional for sandbox deploys, which is why sandbox iteration is fast. Production is where test levels and code coverage are enforced.
What is package.xml in Salesforce?
It's the manifest that tells the Metadata API which components to retrieve or deploy, listed by metadata type and member name. Salesforce CLI can generate one from an org or a local project.