Create Change Set using package.xml

Hello Folks!
Today I would like to show you, how to generate Change Set metadata content, based on package.xml.
Let’s assume, that you have a repository with all changes that you made on the environment, but the client’s politics requires Change Sets to move content from sandbox to production. We have a problem! You have a lot of apex classes, objects, LWC components, etc. and now you need to select all of them in Change Sets UI. It can be painful, but no worries. We have a solution for it!
Let’s begin!

Step 1: Create Outbound Change Set

Before we fill our ChangeSet with metadata content, we need to create it.
Go to your sandbox, Setup > Outbound Change Sets, and create a new one.
Copy your Change Set’s name, will be needed later.

Create Change Set
Created ChangeSet

Step 2: Adjust your code and package.xml

Go to your repository, or wherever you have org’s metadata, and modify the package.xml file with the following line [3] and [4] (optional)

<?xml version="1.0" encoding="UTF-8"?>
<Package xmlns="">
    <description>Change Set Description</description>
Code structure
Code structure

Important! Create .zip with all changes.

Zipped Change Set
Zipped ChangeSet

Step 3: Log in to Workbench

Firstly go to Workbench and log in to the sandbox where you created ChangeSet in the first step.

Secondly, go to migration > Deploy and upload your .zip file created in step 2 and check Auto Update Package.
Finally, Click Next and Deploy.

Upload Change Set via Workbench
Upload ChangeSet via Workbench
Successfully Update
Successfully Update

Step 4: Enjoy your Change Set with uploaded metadata!

Uploaded Change Set
Uploaded Change Set


  • Make sure that your ChangeSet doesn’t exceed approximately 5,000 components.
  • Change Set’s names are not unique! Be sure that during the upload with workbench you have only one Change Set with the full name used in package.xml
  • After you upload a ChangeSet, its status becomes closed, and you can’t make changes to its component

Was it helpful? Check out our other great posts here.


5 13 votes
Article Rating
Notify of
Oldest Most Voted
Inline Feedbacks
View all comments
Renan Rocha
Renan Rocha
1 year ago

Hello Piotr, first thanks for sharing.

Unfortunately for me this solution does not work, I’m getting the result: “More than 1 developer package named ‘TestDeployPack’ exists in this organization. Please rename one of packages so that it has a unique name.”

Tried creating the zip with a folder and without it, also tried changing the API to 49 like your example, nothing seems to work on my end.

1 year ago

Typo at closing tag for description in package.xml

Close Menu
Would love your thoughts, please comment.x