Change what a site's docroot IS, without deleting anything.
Types:
wordpress WordPress, PHP and a database (the default)
php PHP and a database, no WordPress
php-nodb PHP, no database
static-site HTML/CSS/JS only, no PHP and no database
⚠ NON-DESTRUCTIVE. Existing files stay on disk and existing databases are
not dropped. They remain the customer's data and keep counting against
their plan's quota — this changes how the site is SERVED, not what it
holds. Converting back later finds everything where it was.
⚠ Moving to a type without PHP does not merely stop executing .php — it
stops serving them. The vhost returns 404 for php/phtml, because falling
through to the static handler would return the file's SOURCE, and a
docroot converted from WordPress still contains wp-config.php with the
database password in it.
Shared hosting only. On a VPS the whole container is the customer's and
they reconfigure it with the tools inside it.
Requires: API key with write scope.
Args:
slug: Site identifier
site_type: One of the four values above
Returns:
{"from": "wordpress", "to": "static-site", "database_created": false,
"placeholder_seeded": false, "pool_removed": true}
`placeholder_seeded` is true only when the docroot was EMPTY — an
existing site's content is never overwritten.
Errors:
VALIDATION_ERROR: Unknown type, or the site is not on shared hosting
NOT_FOUND: Unknown slug or not reachable by this account
ConnectorNo auth