How can I revoke or expire an old Wix Headless preview URL?

For a Wix-managed Headless project, what is the supported way to revoke, disable, or set an expiry on an old deployment URL created by wix preview?

wix preview --help describes creating a preview, but I cannot find a command for listing or retiring existing previews, or an equivalent control in the dashboard.

Is there a supported CLI command, API, or dashboard page for managing the lifetime of a specific preview URL? Do preview URLs expire automatically?

I am asking about retiring an individual preview without deleting the app, changing CMS data, or creating another deployment. Documentation or an example workflow would be appreciated. Thanks!

Unfortunately I have brought up this issue about a year ago - preview deployments stay up with no expiration, and are able to interact with the live database

This means if you ever made a preview deployment with vulnerable or volatile code, it is there and exposed forever

@noahlovell let this comment serve as a bump - the issue must be addressed…

This capability doesn’t exist yet. Dean’s right that preview URLs persist indefinitely with no documented way to revoke them.

The CLI docs confirm the behavior: “Each preview URL directs to a unique version of your project hosted on Wix’s servers. Subsequent updates to your project won’t affect any previously created versions.” The preview command has no flags for expiry, and there’s no dashboard control or API for managing preview lifecycles.

The security concern Dean mentioned is real. Preview deployments can interact with your live database, so a preview containing vulnerable code or exposed credentials stays accessible at its URL indefinitely.

Two paths forward:

  1. Use wix release instead of wix preview for anything beyond quick internal testing. Release creates versioned deployments that you control through your project dashboard. You can unpublish versions, and they don’t persist as dangling URLs the way previews do. The tradeoff is that release registers your extensions and increments your version number, so it’s heavier than preview — but that’s the cost of lifecycle control.

  2. For true previews with expiry, use a separate staging project with its own database. Clone your main project’s structure, point wix preview at the staging database, and tear down the staging project when you’re done. That kills all its preview URLs. More setup, but it works.

Feature request path: File this with Wix support as “preview URL lifecycle management” — ideally a --ttl flag on wix preview or a dashboard view of active preview URLs with a revoke button. Mention the security implication (exposed credentials in a preview), not just convenience. Dean’s tag of @noahlovell suggests it’s on someone’s radar, but there’s no timeline.

The immediate pragmatic answer: if you’ve already created previews with sensitive content, treat those URLs as compromised. Rotate any credentials that were in that code, audit what data those previews can reach, and use release going forward.

Verified against: preview, release

Hey! I’ve raised this and shared the conversation with the team. Will update with more info :slight_smile: