Having multiple environments on your Umbraco Heartcore project can be a great asset for testing and having a place where your content editors can work without interfering with anything on the Live environment.
When working with multiple environments, it is important to follow the correct workflow. In this article, you can learn more about the workflow and the best practices for using it.
The workflow uses a classic "left to right" deployment model, meaning that changes are first made on the Development environment and then deployed to the Staging or Live environment. The workflow depends on whether you have a Staging environment which further depends on the plan your project is on.
We recommend that you do not work with Document Types directly on the Live environment. This should, as a rule of thumb always be done on the "lowest most" environment: the Development environment.
The deployment approach is divided into two steps:
Structure changes like Document Types and Data Types are deployed via the project portal page
Content and Media are transferred/restored via the Umbraco Backoffice
Each step is defined in more details in the following articles.
While structure changes are deployed between environments using the Cloud Portal, content and media transfers and restores are handled through the Umbraco Backoffice.
In order to be able to transfer/restore content and media, you need to make sure that the environments you're transferring between are in sync.
Learn more about how to do that, in the article.
Another difference between the two steps, is that content and media can be restored against the left-to-right flow. This means that when you have a lot of content on a Live environment, it is possible to restore all this content on a Development and/or Staging environment.
The screenshot above is from the Content section on a Development environment. Right-click the Content tree to open the menu as shown in the screenshot.
Queue for transfer gives you the option to queue all content in the Content tree for transfer to the next environment (Staging or Live). It is also possible to right-click single nodes in the content structure in order to only queue some of it for transfer.
Restore gives you the option to restore all content from environments right of the current environment. In some cases you might not want to restore all content as once, in which case you should use the Partial restore option instead. Partial restore can be found by right-clicking a node in the content tree.
Structure changes like new and/or updated Document Types need to be deployed through environments using the Project View in the Cloud Portal.
In the screenshot above, changes made on a Development environment are ready to be deployed to the Live environment, as indicated by the blue button: "Deploy changes to Live". Had there been a Staging environment on the project, the changes would first be sent to the Staging and then opened up for the option to deploy from Staging to Live.
A deployment from one environment (source) to another (target) goes through the following steps:
The target environment is checked for changes
If changes are found, these are pulled down and merged into the source environment
The changes in the source environment are then pushed to the target environment
This process might take a few minutes, depending on the amount of changes being deployed.
Once your structure has been deployed, it will be possible to transfer your content and media as well. This is done from the Umbraco Backoffice - read more about this in the Content transfer/restore article.