Create a website
site_createCreate a PHP website with optional FTP and MySQL accounts in one API call, returning generated credentials once so they can be captured before they are lost.
Instructions
Create a PHP site, optionally with an FTP account and a MySQL database in one call. The panel generates passwords; the response returns them once, so capture them for the user rather than logging them.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| ps | No | Human-readable remark shown in the panel. | |
| ftp | No | Also create an FTP account. | |
| sql | No | Also create a MySQL database. | |
| path | Yes | Absolute root directory, e.g. /www/wwwroot/example.com. | |
| port | No | Web port. | |
| type | No | Project type; "PHP" for a PHP site. | PHP |
| codeing | No | Database charset when sql is true. | utf8mb4 |
| set_ssl | No | 0 = no certificate, 1 = request one. | |
| type_id | No | Group id from site_types; 0 is default. | |
| version | Yes | PHP version from site_php_versions, e.g. "82" or "00" for static. | |
| webname | Yes | JSON: {"domain":"example.com","domainlist":[],"count":0} | |
| datauser | No | Database name/user; required when sql is true. | |
| force_ssl | No | 0 = keep HTTP, 1 = force HTTPS redirect. | |
| datapassword | No | Database password; required when sql is true. | |
| ftp_password | No | FTP password; required when ftp is true. | |
| ftp_username | No | FTP username; required when ftp is true. | |
| is_create_default_file | No | Create the default index page. |