Build and Deploy a Project with the Wix CLI for Headless

This feature is in Developer Preview and is subject to change.

After developing and testing your Wix CLI for Headless project locally, you can take it to production. This article guides you through that process.

Prerequisites

Before getting started, make sure that:

  • You have Node.js (v20.11.0 or higher).
  • You're logged into your Wix account. If you don't already have one, sign up for a Wix account.
  • You have a Wix CLI for Headless project. For instructions on creating a project, see Quick Start.

Step 1 | Build the project

Run the following command to build the assets for your project:

Copy

Step 2 (optional) | Create preview URLs

A preview URL is a link you can share with team members that allows them to preview and test your project's site and dashboard. 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.

To push your project to Wix's servers for hosting and create preview URLs, run the following command:

Copy

This returns unique URLs linking to preview versions of your site and dashboard that you can share with others.

Step 3 | Release your project

Now that you've built your project, it's time to release. Releasing pushes your project to Wix's servers and publishes your site.

To release a version, run the following command and follow the prompts:

Copy

After releasing your project, the CLI provides preview URLs for your project's site and dashboard, and the URL of your published site.

Next steps

You now have a fully working headless project with a publicly accessible frontend site.

Use the following resources to continue building your project:

Did this help?