Developer documentation

SiteHost CLI

Deploy and manage sitehost sites from your terminal. Every command below is copy-ready and uses the sitehost CLI for this brand.

Before you start: install PHP with curl and zip extensions, then create an API token on this brand. Tokens and sites are isolated per brand.

First deploy, from start to finish

Replace my-site and <site-id>. Your project must have index.html or index.php at its root.

curl -fsSL https://sitehost.se/install.sh | bash
sitehost create --name=my-site --type=static
sitehost sites
cd /path/to/my-site
sitehost deploy --site=<site-id> --path=.
sitehost open --site=<site-id>

Every CLI command

Copy one example or copy the full Markdown guide for an AI chat or a .md file.

Install

curl -fsSL https://sitehost.se/install.sh | bash

Installs the brand-specific command and configuration.

First deploy

sitehost create --name=my-site --type=static
sitehost sites
cd /path/to/my-site
sitehost deploy --site=<site-id> --path=.
sitehost open --site=<site-id>

Use --type=php for PHP or WordPress. The site ID comes from the create response or sites list.

List and inspect

sitehost sites
sitehost status --site=<site-id>

Shows your sites, then status, URL, source, release, and uptime for one.

Environment variables

sitehost env --site=<site-id>
sitehost env --site=<site-id> --set APP_ENV=production

For eligible PHP sites. Never expose secret values in public logs or tickets.

Logs

sitehost logs --site=<site-id>
sitehost logs --site=<site-id> --error

Access logs first; server and PHP errors second.

Releases and rollback

sitehost releases --site=<site-id>
sitehost rollback --site=<site-id> --release=<release-id>

List releases, then restore a previous successful one.

Custom domain

sitehost domain --site=<site-id> --set=www.example.com
sitehost domain --site=<site-id> --verify
sitehost domain --site=<site-id> --remove

Set a domain, create the returned DNS record, verify SSL, or remove it.

Database

sitehost db --site=<site-id> --create
sitehost db --site=<site-id>
sitehost db --site=<site-id> --delete

Create, view, or permanently delete a MySQL database for an eligible PHP site.

Delete a site

sitehost delete --site=<site-id>

Permanently deletes the selected site. Confirm the ID before running it.