If some content is published on an environment (for e.g., staging), and you want to publish the same set of content to another environment (for e.g., production), you can do that by manually publishing each entry to the new environment, provided the number of content pieces is low.
However, the manual method is not feasible if you wish to do it for hundreds or thousands of content pieces. You can simplify this by using either of the following suggested ways.
Add Items to Release and then Deploy
- Use Sync APIs: The first step is to make use of our Sync API calls. By using the Initial sync API call on the "staging" environment, you will get all the published entries and assets in return.
- Add items to the release: Store the UIDs of the assets, entries (returned through the Sync API), and then use the Add multiple items to a release API call. In this way, you'll be able to add assets and entries to a release. You can add 200 items to a release. So you can create multiple releases to store all the items. Read more on how to work with releases.
Alternatively, you can publish content directly to the new environment. However, you need to be careful with this option as you might end up reaching rate limiting. Therefore, you'll have to find a way to handle retries.
- Deploy your release: Lastly, when all the items are added to the releases, deploy them to the "production" environment to get them published. Read more on deploying a release.
Once this is done, you will see all the content published in the new environment.
Use our Bulk Publishing Script
Another way to do this quickly is to use the bulk-publish-entries-assets script. It automates the process of publishing content (entries and assets) from one environment to a newly created or any other environment.
Read more on how to bulk publish entries and assets from one environment to another.