Enable Version Management
By default, Version Management is not enabled on a zone.
To enable Version Management:
- Log in to the Cloudflare dashboard.
- Select your account and zone.
- Go to Version Management.
- Select Enable versioning.
Once you enable Version Management, Cloudflare will automatically create:
- Version Zero, think about this as the configurations of your current zone. Part of your products currently visible in the navigation are going to be displayed under Versions and the other ones under Global Settings. Once default environments are created, Version Zero is automatically deployed to them, guaranteeing no disruption in your live traffic. This Version is also permanently editable. In case you decide to disable Zone Versioning, Version Zero will become your zone again.
- Global Settings, you can find all the settings here that are not supported by Version Management.
On the Environments page, you can create default environments for Production, Staging, and Development.
Disable Version Management
To disable Zone Versioning:
Confirm that Version Zero has the correct settings for your zone:
Use the comparison feature to view the differences between your current Production version and Version Zero.
If there are differences, make changes to Version Zero so it matches your current Production version.
Promote Version Zero to your Production environment.
Confirm that your new Production environment functions as expected.
Send a
GET
request to the/zones/{zone_id}/environments
endpoint.curl "https://api.cloudflare.com/client/v4/zones/{zone_id}/environments" \--header "X-Auth-Email: <EMAIL>" \--header "X-Auth-Key: <API_KEY>"In the response, save the following values:
- The environment
ref
of every rule
- The environment
Using the
ref
of those environments, send aDELETE
request to the/zones/{zone_id}/environments/{ref}
endpoint for each environment.curl -X 'DELETE' "https://api.cloudflare.com/client/v4/zones/{zone_id}/environments/{ref}" \--header "X-Auth-Email: <EMAIL>" \--header "X-Auth-Key: <API_KEY>"Then, send a
GET
request to find all HTTP applications (or versions of your zone).curl "https://api.cloudflare.com/client/v4/zones/{zone_id}/http_applications" \--header "X-Auth-Email: <EMAIL>" \--header "X-Auth-Key: <API_KEY>"Save the
id
of each HTTP application.Using the
id
of those HTTP applications, sendDELETE
requests for every application.curl --request DELETE "https://api.cloudflare.com/client/v4/zones/{zone_id}/http_applications/{http_application_id}" \--header "X-Auth-Email: <EMAIL>" \--header "X-Auth-Key: <API_KEY>"
Once all these steps are completed, Zone Versioning will go back to its original landing page.