In most cases, you’d want to create and test your onboarding content on the staging environment. But, when it's time to publish everything in the production environment, you would not want to re-create everything from scratch.
In this article, we’ll explain how to move contents across different environments.
What should I change while moving contents to a different environment?
If you plan to move your content to the production environment after creating and testing on a staging environment, there are three main points for you to consider:
UserGuiding container code (when using more than one container.)
Redirection settings (applies only to guides.)
How to adjust content settings to move them to a different environment?
While managing your onboarding content on different environments, you can either use the same container code for both platforms or create and use separate containers.
A few considerations:
A single container if the URLs are subdomains or subfolders (i.e., userguiding.com/blog, staging.userguiding.com.)
Different containers if the domains are different (i.e., userguiding.com & staging-userguiding.com.)
When you utilize the same container code
If you are using the same container for both environments, all you need to change is the targeting settings and the redirection URL. The latter is only required when using guides.
To display your content only in the testing environment, you can include the specific subdomain for the staging environment in the targeting rules. (e.g. URL contains test.userguiding.com/)
Once you finish testing your content, you can change the targeting rules to include the production environment. (e.g. URL contains userguiding.com/)
Here is an example of how to change the Redirection URL field (if turned on):
Guide’s targeting rule: URL > contains > userguiding.com/
Guide’s redirection URL: https://test.userguiding.com/
Once finished with testing, you can adjust the redirection URL to “https://userguiding.com/”.
As the last step, don't forget to click Save and Publish Changes.
When you utilize different container codes
If you are using different containers for your environments, you simply need to change the targeting settings as explained above and also change the container of your content.
Set the targeting to include the staging environment while creating and editing your content. (e.g., contains staging-userguiding.com.)
Once the content is ready, change the targeting settings to include the production environment. (e.g., contains userguiding.com.)
Once you finish testing, change the redirection URL and the container to the production environment.