> ## Documentation Index
> Fetch the complete documentation index at: https://docs.wpos.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# Provisioning

> eu-studio newsite: one command to a fully provisioned build site, plus the target resolution contract.

`eu-studio` is the operational layer around the [playground](/ultra/playground):
it boots sites, verifies them, and encodes the environment fragility lessons so
agents do not rediscover them per session.

## newsite: one command to a build-ready site

```text theme={null}
usage: eu-studio newsite --port <n> --dir <site-dir>  (boots + patches plugin + activates Pro + verifies; idempotent)
```

It replaces the manual ritual (boot playground, wait, copy and activate Pro,
hand-patch the plugin) with one idempotent command. What it does, in order:

<Steps>
  <Step title="Boot">
    Boots the playground on the given port and directory. If the port already
    serves, it reuses the running site (re-running newsite is a re-verify, not
    a re-provision). Cold hydration downloads the snapshot, so the first boot
    is allowed several minutes.
  </Step>

  <Step title="Patch the companion plugin">
    The snapshot can carry an older companion plugin than your local
    elementor-ultra-mcp checkout. When a local checkout is present, newsite
    copies the current plugin files into the site.
  </Step>

  <Step title="Copy and activate Elementor Pro (optional)">
    If a Pro plugin source is available (`EXJSX_PRO_DIR`, or auto-discovered
    from a sibling provisioned site), the files are copied in and Pro is
    activated over REST. Without a source it continues free-only and says so.
  </Step>

  <Step title="Bounce the worker">
    PHP-WASM caches plugin code in the running worker: files patched after boot
    are invisible until a restart, so a site can pass every check while still
    executing the old plugin. newsite kills the worker; the crash supervisor
    respawns it with the patched files loaded.
  </Step>

  <Step title="Verify, including the version gate">
    It then checks the seam (`site/capabilities`), the static-404 guard, and
    that the **running** plugin version matches the patched source on disk. A
    mismatch means the bounce failed and the site is executing stale code; the
    warning tells you to bounce again:

    ```text theme={null}
    [newsite] WARNING: running plugin X != patched Y : worker is executing STALE code;
    bounce it (kill the port listener; the supervisor respawns).
    ```
  </Step>
</Steps>

The command returns the site's URL, credentials, Elementor and Pro versions,
and the guard states, so a calling agent can proceed without further probing.

## status: one-line health

```bash theme={null}
eu-studio status
```

```text theme={null}
✓ http://127.0.0.1:8927 : site 200, Elementor 4.2.1 + Pro, seam up
```

For the full check list with self-heal, use [doctor](/ultra/verify).

## The target resolution contract

Every `eu-studio` command resolves its target site the same way, in priority
order:

1. **Flags**: `--url`, `--user`, `--app-password`
2. **Environment**: `WP_URL`, `WP_USER`, `WP_APP_PASSWORD`
3. **Baked defaults**: the local playground snapshot's credentials on the
   default port

So the same command works against a playground bench, a docker stack, or a real
site with the companion plugin; only the target changes. This is the same env
contract `exjsx deploy` and the MCP server use (see [Install](/ultra/install)).
