Sandbox environments start out as exact copies of one of the existing environments (i.e., the primary one). The process of creating a new sandbox from an existing environment is called forking.
Each environment is identified by a name (e.g., master
) and stores the following information:
Models
Records
Uploads
Plugins
The content navigation bar
Configuration (locales, timezone settings, appearance, SEO preferences)
When making changes to any of the aforementioned entities in any environment, including the primary environment, the data in all other environments remains unaffected.
To manage all your project's environments, head over to the Project Settings > Environments section. To create a new sandbox starting from an existing environment, click on the contextual menu > Fork, and choose a name for the new environment.
DatoCMS will perform a deep copy of all the information contained inside the source and transfer it to the new sandbox.
Once there's at least one sandbox environment, developers will be able to switch environments using the top bar panel.
Editors will never see this panel due to a reduced set of permissions and will continue their editorial workflow in the primary environment as usual.
At any time, you can promote a sandbox environment to become the new primary environment. The old primary environment will be demoted to a sandbox environment, and content editors will immediately see the interface refresh. From that moment, they will only be able to see and make changes to the new primary environment.
To be updated when a sandbox gets promoted, you can set up a webhook listening to the "Environment Promote" event.
At any time, you can change the name of an existing environment. This change won't impact those working on the CMS:
To be updated when a sandbox gets renamed, you can set up a webhook listening to the "Environment Update" event.
Changes to a primary environment can be potentially disruptive, so we give you the ability to block any user from editing the primary schema or configuration.
You can do this by going to Project settings > Global properties and enabling "Force the use of sandbox environments". If enabled, no user can edit the primary environment and make changes to its schema and configuration, regardless of their role.