Environments

In this article, you'll learn what Environments are and how to use them to safely iterate your Custom Types.


Environments involve creating clones of your repository. This feature is included with all Enterprise plans and is available as a paid option on yearly Platinum plans paid via invoice. To enable this feature, please reach out to our Sales team.

Prismic Environments allow you to clone the entirety of your production repository, copying all Custom Types, documents, and media files.

This is useful if, for example, you have a continuous development cycle and regularly implement new website designs, or if you want to iterate your Custom Types in isolation.

The user base remains independent, ensuring that only the relevant developers and content editors access the development environment.

How to add a new Environment

If your repository is on a Platinum plan or an Enterprise plan and you're an Administrator, you can clone your repository directly from the UI. If you don't see that option in your repository settings, please reach out to your account manager.

Move Custom Types between environments

Let's say you need to move an edited Custom Type from a development environment to a production environment. Here are the steps:

  1. Copy the JSON of the Custom Types in your development environment, and paste it into the JSON editor of the Custom Type in the production environment.
  2. Create new documents using the updated Custom Types in the production repository. These updates can be grouped in a Release.
  3. Make the necessary changes in the front end of your project to reflect the changes.

Impact of updating the Custom Types in production

Adding a new field in a Custom Type will appear in the API response with default values the first time something is published in the repository.

Adding new fields

We have a simple Custom Type composed of a Title Field with the API ID of title and a Rich Text field with the API ID of content. Before making any changes, here is the data we receive from the API for that document:

Copy
"data": {
  "title": "My article title",
  "content": "My article content"
}

Then, if you add a new field — for example, a Key Text field with the API ID of author to the Custom Type — the API response will remain the same until the next document is published in the repository. If no content has been populated for that new field, the API will return this field with a default value:

Copy
"data": {
  "title": "My article title",
  "content": "My article content",
  "author": null
}

Note about removing or renaming the API ID of a field. You cannot rename the API ID of a field. Renaming a Field is equivalent to deleting an old field and creating a new one, meaning that the content won't be migrated. Read more here: Change the API ID of a field.

Should I use Environments for staging content?

No, these environments are only meant for updating the codebase or the Custom Types without endangering the production repository.

We recommend that content editors stay on the production repository to author new content and use Releases and Previews to check the presentation on the front-end before publishing it.

Can I use "development" endpoints for Integration Fields?

Yes. Read the following guide to understand how Integration Fields and Environments work together and how you can Configure a different IF endpoint on your cloned environments.


Was this article helpful?
Not really
Yes, Thanks

Can't find what you're looking for? Get in touch with us on our Community Forum.