> Portal Navigation:
> 
> - Append `.md` to any URL under `https://dev.wix.com/docs/` to get its markdown version.
> - Pages are either content pages (article or reference text) or menu pages (a list of links to child pages).
> - To get a menu page, truncate any URL to a parent path and append `.md` (e.g. `https://dev.wix.com/docs/sdk.md`, `https://dev.wix.com/docs/sdk/core-modules.md`).
> - Top-level index of all portals: https://dev.wix.com/docs/llms.txt
> - Full concatenated docs: https://dev.wix.com/docs/llms-full.txt

## Resource: Host an Exported Site Outside Wix

## Article: Host an Exported Site Outside Wix

## Article Link: https://dev.wix.com/docs/studio-two/code-your-site/export-your-site/host-an-exported-site-outside-wix.md

## Article Content:

# Host an Exported Site Outside Wix

<blockquote class="caution">

__Alpha:__
[Exporting your site to code](https://dev.wix.com/docs/studio-two/code-your-site/export-your-site/about-exporting-your-site-to-code.md) is currently in alpha. This feature is subject to change and may have bugs, issues, and limitations. We're actively improving it based on your feedback.

</blockquote>

Build an [exported site](https://dev.wix.com/docs/studio-two/code-your-site/export-your-site/about-exporting-your-site-to-code.md) and run it on your own Node.js host. The build is a Node server that serves each page, along with the site's 404 page for unknown URLs.

The hosted site still partially depends on Wix. It loads fonts and media from Wix and calls Wix APIs for any business features on the page. For the site features that don't run outside Wix yet, see [Current limitations](https://dev.wix.com/docs/studio-two/code-your-site/export-your-site/about-exporting-your-site-to-code.md#current-limitations).

## Before you begin

Make sure you have:

- An exported site with its packages installed. For more information, see [Export Your Site to Code](https://dev.wix.com/docs/studio-two/code-your-site/export-your-site/export-your-site-to-code.md).
- A host that runs Node.js 22.12 or later.

## Build and run the site locally

Run the production server on your computer before you deploy, to check that the site builds.

To build and run the site:

1. In the root of the exported site, build the site:

   ```bash
   yarn build
   ```

   The build writes to `packages/site-app/dist`. A page that the build can't compile stops the build.

2. Start the server:

   ```bash
   yarn start
   ```

3. Open `http://localhost:3000` and check the site's pages.

The server serves the last build, so after you change the site, build it again.

## Deploy the site

Deploy the whole exported site, not only the build. The server loads the site's packages at runtime, and the build reads the site's settings from `packages/site-app/.env`.

To deploy the site:

1. Copy the exported site to your host, or push it to a git repository that your host deploys from. Leave out `node_modules` and `dist`, which the exported site's `.gitignore` already excludes.
2. On the host, install, build, and start the site:

   ```bash
   yarn install
   yarn build
   yarn start
   ```

   The server listens on port 3000. To use a different port, set the `PORT` environment variable. Most Node.js hosting platforms set `PORT` for you, so the site works there without changes.

## See also

- [About Exporting Your Site to Code](https://dev.wix.com/docs/studio-two/code-your-site/export-your-site/about-exporting-your-site-to-code.md)
- [Export Your Site to Code](https://dev.wix.com/docs/studio-two/code-your-site/export-your-site/export-your-site-to-code.md)
- [Edit an Exported Site](https://dev.wix.com/docs/studio-two/code-your-site/export-your-site/edit-an-exported-site.md)
- [Import Changes to Your Site](https://dev.wix.com/docs/studio-two/code-your-site/export-your-site/import-changes-to-your-site.md)