Using Content Environments
Content environments are only available on Pack storefronts.
Content environments are crucial for managing and previewing different versions of your website's content in a controlled and isolated manner.
They are especially beneficial in development and testing phases, allowing you to experiment and make changes without impacting your live site, whether you’re creating a staging environment or preparing a holiday campaign.
To understand more about content environments, you can access our detailed guide here.
Creating a new content environment
- Go to Pack’s admin > Home.
- Click on the + button next to the content environments section on the right-hand side of the dashboard.
- Select the source environment that you want to duplicate.
- Assign a name and handle to your new environment.
This process enables you to work on different versions of your content, test new features, or make changes without affecting your primary content environment.
Promoting content environments
- Navigate to the desired content environment.
- Click on the Promote to Primary environment button.
Promoting an environment to be your primary environment means it becomes the default environment for your storefront, and its content will be displayed to your end-users.
Managing content environments
- Navigate to Pack’s admin > Home.
- Click on the content environment you wish to manage.
- Here, you can rename, change the handle, or delete the environment as needed.
Force storefront to use content environments
You can force the storefront to use a specific content environment by using the Content Environment toggle in the Customizer.
Content Environment Variables
You can set the PACK_CONTENT_ENVIRONMENT
and PUBLIC_PACK_CONTENT_ENVIRONMENT
(both are required) environment variables to force the storefront to use a specific content environment outside of the Customizer, e.g. for a specific Github branch.