# Building and publishing > Building a static site, checking it, publishing it and going back to the previous version. Source: A build needs PHP and Node.js 20 or newer; it needs no Vite, npm packages or other frontend build tools. The command reads the Markdown and the JSON, checks the Framework lock and creates a finished static folder. Node.js runs the SIMAI Framework page composition code. ## The safe path :::steps 1. Build the `production` output. 2. Check it with `verify-static`. 3. Open that same output over HTTP through `serve --no-build`. 4. Before publishing, move the checked folder to staging. 5. Compare the digest, run the smoke checks, and only then switch the traffic. 6. On an error, bring back the previous folder you kept. ::: ```bash php vendor/bin/docara build production php vendor/bin/docara verify-static build_production php vendor/bin/docara serve production --host=127.0.0.1 --port=8000 --no-build ``` The preview holds the terminal until `Ctrl+C`. Do not use `file://`. ## Guides - [Building the site](https://docara.io/en/build/php-only/) — the commands, the finished folder and reproducibility - [Local preview](https://docara.io/en/build/local-preview/) - [Checking the build](https://docara.io/en/build/verify/) - [Building in CI](https://docara.io/en/build/ci/) — commands for any CI and a ready GitHub Actions process with GitHub Pages - [Hosting the site](https://docara.io/en/build/hosting/) - [Publishing and rolling back](https://docara.io/en/build/publish/) - [Building for a portal](https://docara.io/en/build/portal/) - [Updating Docara](https://docara.io/en/build/update/) — including the move from 2.x to 3.0 A successful local check is no automatic permission for a public release or a production deployment.