Sites
The Sites section of a server (/servers/:id/sites) is where you create and run
the non-containerised web apps that box serves from Nginx: static HTML/SPA, plain
PHP / Laravel / Symfony, Node.js / Python / Go runtime apps, and WordPress. It’s a
searchable, filterable list of site cards — create, enable, disable, delete, clone and
cap each site’s resources. Site CRUD and per-site resource limits are available on
all plans.
Create a site, step by step
Section titled “Create a site, step by step”New site opens a three-step, type-first wizard.
- Pick a type. Seven cards: WordPress, PHP / Laravel, Static HTML, Node.js, Python, Go and Custom / blank (a web root + SSL with no framework — it is created as a static site).
- Configure it. Enter the Domain (must include a TLD), then the type’s fields:
- WordPress — choose a method: Install fresh (optional site title, language, admin user and email, Redis object cache on/off, discourage search engines, database name), Import existing (links to the migration tool in Tools, which pulls a site from cPanel / Plesk / SSH / an archive), Clone (pick a WordPress site from this server or the fleet, then choose the destination server and new domain) or Blank (the vhost, PHP pool and database without downloading WordPress).
- PHP / Laravel — Framework (plain / Laravel / Symfony). Laravel and
Symfony default the document root to
/public. A Laravel site also gets a production.env, a database (MariaDB when installed, else SQLite), its migrations, the scheduler and a queue worker — see Laravel. - Node.js / Python / Go — runtime version, the Start command the process supervisor runs, and the internal App port (1024–65535) Nginx reverse-proxies to.
- Optional — a Document root, and for PHP/runtime sites a Git repository (this adds a Deploy tab to the site’s Manage drawer).
- Advanced — the PHP version (default = the box default) and the resource plan (default = the box default plan, see below).
- Project — optionally file the new site into a project environment.
- SSL & create. HTTPS is issued automatically with Let’s Encrypt; tick skip to create the site without a certificate for now (this works for WordPress too).
The site is provisioned in the background (~1 minute). A pending card with a spinner shows above the list while the agent builds the Linux user, PHP-FPM pool / systemd unit, Nginx vhost and certificate; the real card replaces it when the site comes up. For WordPress the final step shows the generated admin and database credentials once — copy them then.
What else you can do
Section titled “What else you can do”- Search & filter — search by domain or alias. The filter panel has Type, Plan, Tag and Project; type counts update live. Site tags are a shared multi-tag pool you assign inline on each card.
- Refresh from the agent — the list reads an agent-pushed inventory cache; the refresh button (“synced Nm ago”) asks the agent to re-push now.
- Enable / disable — disable takes the site offline (visitors get a branded 503) without deleting anything; enable relinks it.
- Delete — permanently removes the site’s files and database. Not undoable.
- Open — WordPress sites open the per-site shell (content cockpit); every other type opens its Hosting pages. Manage opens the per-type drawer described in Site tools.
- Clone on the same server — copy a WordPress site to a brand-new domain on this
box (
site.clone, modenew). - Copy to another server (Pro) — copy any site type (WordPress, static, PHP or
runtime) to another server under a new domain. Overwriting an existing site on the
target is WordPress-only. Needs agent 0.2.137 or newer on both boxes. Cancel in
the progress view stops the copy until the target starts rebuilding the site
(
files_xfer_cancelwith the copy’stransferId). - Bulk actions — select cards to reveal a floating bar: Set plan, Clear cache (WordPress page cache purge, per site), Enable, Disable, Delete and Back up.
Per-site resource limits (all plans)
Section titled “Per-site resource limits (all plans)”Cap what each site may consume so one runaway site can’t take down the whole box. It
is built on stock Linux — systemd cgroups v2 slices, ext4/XFS disk quota and
MariaDB per-user limits, no proprietary kernel. Define reusable resource plans in
the Plans drawer, mark one as the box default (applied to every new site), and
assign a plan per site from the card’s plan column or at create time.
| Field (job body) | Cap | Format |
|---|---|---|
cpu | CPU ceiling (e.g. 200% = 2 cores) | ^\d{1,4}%$ |
mem | Memory hard limit (OOM-kill above it) | e.g. 512M |
tasks | Process cap (stops fork bombs) | 1–100000 |
disk / inode | Disk quota on the site’s Linux user | e.g. 5G / 200k |
conc | Concurrent requests — extra ones get a 503 | integer, 0 = none |
ioRead / ioWrite / iops | Disk read MB/s, write MB/s, IOPS | integer, 0 = none |
dbConn / dbTime / dbQph | DB connections, max query time (s), queries per hour | integer, 0 = none |
Automatic DB throttling (opt-in per plan)
Section titled “Automatic DB throttling (opt-in per plan)”A site’s database queries run inside MariaDB/MySQL, outside the site’s CPU cap. A plan can
opt in to Automatic DB throttling (Plans drawer → edit a plan → the switch at the bottom;
off by default, agent 0.2.164+). The server then checks every minute how many seconds the
site’s database user kept the database busy. Above the threshold for the set number of
minutes, it lowers that user’s connection limit (MAX_USER_CONNECTIONS); after the
cool-down below the threshold the site’s own limit (dbConn, or unlimited) comes back.
Running queries are never stopped, only new connections past the limit are refused. It runs
from a system cron on the server, so it also works while the server is offline from MZPanel.
The site’s Health tab shows “Database throttled until …” while it is active, and a
resource.cap alert is sent when it starts and ends.
Field (plan.set) | Meaning | Default / range |
|---|---|---|
dbThrottle | turn it on or off (omitted = keep the plan’s setting) | off |
dbThrottleSec | DB busy seconds per minute that count as overloaded | 30 (1–3600) |
dbThrottleSustain | minutes in a row over the threshold before throttling | 5 (1–60) |
dbThrottleConn | connection limit while throttled (never below 2) | 4 (2–1000) |
dbThrottleCool | quiet minutes before the site’s own limit returns | 10 (1–1440) |
A site belongs to a plan when its CPU, memory and process caps equal the plan’s (the same
match the site card’s plan column shows). A site whose own dbConn is already at or below the
throttled value is left alone. Root and system database users are never changed.
The Plans drawer also has box-wide isolate all sites (sandboxed PHP-FPM per site,
site.isolate-all) and re-apply hardening (site.harden). New PHP sites are
isolated by default, so the site list marks only the risky case: a PHP or WordPress
site that still shares the PHP-FPM master shows an amber shield (Not isolated). Each site’s Health
tab shows how often it hit its caps — see Site tools.
How it works
Section titled “How it works”Every action dispatches a job to the server’s agent, which runs it natively against Nginx, PHP-FPM, systemd and the box’s package tools. The box config is the source of truth; MZPanel only caches the pushed inventory.
| Action | Job kind | Notes |
|---|---|---|
| List | site.list | the pushed inventory snapshot |
| Create | site.create | user + pool/unit + vhost + install + cert |
| Info / stats | site.info · site.stats | |
| Enable / disable | site.enable · site.disable | |
| Delete | site.delete | needs the sites:delete token scope |
| Clone (same server) | site.clone | {domain, target, mode: "new"} |
| Copy to another server | REST POST /v1/servers/{id}/clone-xserver | Pro |
| Resource caps | site.limits-set · site.limits-clear | |
| Plans | plan.set (with default: true for the box default) | |
| Isolation / hardening | site.isolate · site.isolate-all · site.harden | |
| Laravel | site.laravel-status · site.laravel · site.artisan | PHP + Laravel sites; see Laravel |
site.create field reference
Section titled “site.create field reference”| Field | CLI flag | Values |
|---|---|---|
domain (required) | positional | FQDN |
siteType | --type | wordpress (default), static, php, nodejs, python, go |
framework | --framework | plain, laravel, symfony (PHP) |
runtimeVersion | --runtime | e.g. 22.x (Node), 3.12 (Python), 1.23 (Go) |
appPort | --app-port | 1024–65535 (runtime apps) |
startCommand | --start-cmd | ≤300 chars |
gitRepo | --git | repository URL |
docRoot | --docroot | path |
method: "blank" | --skip-wp-download | WordPress shell without WP |
phpVersion | --php | 8.3, 8.4, … |
sslMode: "skip" | --ssl skip | default auto |
includeWww | --include-www | boolean |
wpTitle · wpLocale · wpAdminUser · wpAdminEmail | --wp-title … | WordPress only |
wpRedis (false) · wpNoindex | --no-wp-redis · --wp-noindex | WordPress only |
dbName · dbUser | --db-name · --db-user | WordPress and Laravel |
laravelScheduler · laravelQueue | --laravel-scheduler on|off · --laravel-queue on|off | PHP + Laravel only; default on |
plan | --plan | plan id; omitted = box default, none = no caps |
The job’s final done event carries the WordPress admin and database credentials.
Through MCP those secret fields are redacted in the job output — open the site in the
panel to see them.
CLI & automation
Section titled “CLI & automation”Every action maps to an mz command on the box — the same engine the dashboard drives:
mz site list --json # every site on the boxmz site create example.com --json # a WordPress sitemz site create app.example.com --type nodejs \ --runtime 22.x --app-port 3000 --start-cmd "node server.js" --jsonmz site create api.example.com --type php --framework laravel --git https://github.com/acme/api.git --jsonmz site limits set example.com --cpu 100% --mem 1024M --jsonmz site disable example.com --json # take it offlinemz site delete example.com --json # remove files + databaseAlways pass --json for machine-readable output. See The mz CLI
and the command catalog.
Automate it (MCP / REST)
Section titled “Automate it (MCP / REST)”MCP (mcp.mzpanel.com) and the REST API (/v1/api, same token) are on every plan.
| Goal | MCP tool | REST / job |
|---|---|---|
| List sites (one box / fleet) | servers_sites, sites_list, servers_sites_all | GET /v1/servers/{id}/sites · GET /v1/servers/sites/all |
| One site’s details | site_get | job site.info |
| Create a WordPress site | site_create (domain, server; preview first, then apply: true) | job site.create |
| Create any other type | jobs_create | POST /v1/servers/{id}/jobs with site.create + siteType |
| Resource caps / plans | jobs_create | site.limits-set, plan.set |
| Copy to another server | sites_clone_xserver | POST /v1/servers/{id}/clone-xserver {dstServerId, sourceDomain, newDomain, overwrite?} (Pro) |
| Cap-hit history | sites_faults | GET /v1/servers/{id}/sites/{domain}/faults?range= |
| Tags / projects | site_tags_*, projects_* |
Typical errors: 400 with Zod-style issues (e.g. appPort below 1024, a domain
without a TLD), 403 when the token lacks operate level (or sites:delete for
site.delete), 403 tier_required for cross-server copy on Free/Plus, and a job exit
127 from an agent too old for the command. The Node.js, Python and Go runtimes are
installed by site.create on every plan.
Gotchas & troubleshooting
Section titled “Gotchas & troubleshooting”- Bulk “Back up” runs a full backup of each selected site to the default destination (the server’s disk when you have none yet). Each card shows its own spinner, then a check; failures are listed in the banner above the list. For files only, database only or another destination, use Back up on one site’s ⋮ menu. The archives appear in Backups → Snapshots; only the server owner can start one.
- Offline servers show a cached list. Create, enable/disable, delete and clone need the agent online.
- Delete is permanent. It removes files and the database with no undo — a bulk delete lists exactly what’s about to go before you confirm. Back up first.
- Same-server clone is new-domain only. The
overwriteandsubfoldermodes ofsite.clonereturnunsupported_mode; use Copy to another server to overwrite a WordPress site. - Runtime sites start from a placeholder. New Node/Python/Go (and PHP-framework) sites come up with a placeholder app until you deploy real code from the Deploy tab.
Related
Section titled “Related”- Site hosting pages — status, logs, files, SFTP, database, backups.
- Site tools — the per-type Manage drawer.
- Sites (across the fleet) — the same sites from the account level.
- Staging & deploys — git deploys and releases.