This guide explains how staging sites function for Enterprise hosted Discourse customers, how they can be used to test and verify changes safely, and the available options for synchronizing staging and production environments.
On Discourse hosting, a staging site provides a sandbox environment where you can test updates, changes, and customizations without impacting your live production site.
Staging site setup
A staging site is typically set up as part of the onboarding process for Discourse Enterprise hosting customers. Staging sites are only included with Enterprise plans and are not automatically created for every Discourse instance.
Staging is designed as a sandbox that allows you to test customizations, updates, or changes without impacting the production site. If you encounter any compatibility issues between your custom settings/plugins and core Discourse, these can be identified and resolved safely on staging before deploying changes to production.
Restricting access to the staging site
Basic HTTP authentication can be used to secure staging sites and block access from unauthorized users or bots. This type of authentication will prompt for a username and password before granting access to the site. Here’s an example of the login screen:
This is particularly handy if you don’t want to make your staging site “login-required” but still wish to restrict access.
Deploys to your staging site
By default, staging sites are automatically deployed by the Discourse team.
What does staging deployment update?
Deployments allow you to test and verify new application code, plugin versions, and theme updates in a controlled test environment.
Deployments are related to application code updates, not content changes. The application code includes changes committed to the Discourse GitHub repository as well as associated plugin and theme repositories.
Syncing production and staging sites
Restoring a backup
The preferred method to synchronize production and staging environments is to restore a backup of one site to the other. Hosted customers can request this process, and it will fully overwrite all content, settings, users, and data on the site receiving the backup restore.
Site-specific configurations, such as authentication or settings tailored to staging, may need manual reconfiguration after each restore.
Here are a few examples of site related configurations you might want to keep in mind with this process:
- User Login Authentication
- SSO Settings
- API Keys
After the sync, emails will be disabled for non-staff users.
FAQs
Does using staging guarantee an issue-free production deployment?
While staging environments help identify many potential conflicts or misconfigurations, they cannot replicate all live scenarios on production (e.g., traffic loads, external API integrations). Still, they provide a significant safety net for development work.
Do staging sites include all production plugins and themes?
Yes, staging site will typically include the same plugins and themes as production sites unless excluded at your request during the setup process. Staging sites can also include plugins or customizations that you would like to test before including on your production site.
Can I have a staging site on a non-enterprise site?
Staging sites are included on our Enterprise plans only.
As an alternative, you can start a 14-day trial site here and use it as a temporary sandbox environment. If you’d like to keep this new instance, we offer a 20% discount off our Standard or Business plans on each second and subsequent site of equal or lesser value.
Last edited by @Southpaw 2024-11-26T23:50:27Z
Check document
Perform check on document: