Skip to main content
WordPress

Install WordPress on a server

Asynchronous Request

Installs WordPress on the server using the provided site parameters and either explicit DB credentials or the server's stored default database credentials. If adminPassword is omitted, one is generated automatically and stored encrypted as the wordpressadmin credential.

Database credential behavior:
- Provide both dbUser and dbPass to use explicit credentials.
- Omit both dbUser and dbPass to use credentials already stored for this server (defaultdb).
- Supplying only one of dbUser/dbPass is rejected.
- If dbName is omitted it defaults to the effective DB user, and if dbHost is omitted it defaults to localhost.

Prerequisite: You must first call POST /servers/{serverSlug}/wordpress/setup-cli to prepare WP-CLI. If the server already has WordPress installed, either include path/url in that setup request or call PATCH /servers/{serverSlug}/wordpress/installation afterwards. Managed WordPress also requires provisioning with a profile where wordpressManagementIncluded=true; discover/select that profile through GET /profiles before creating the server, because this operation is rejected on already-created servers using an ineligible profile.

POST
/servers/{serverSlug}/wordpress/install
Authorizationstringheaderrequired

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

serverSlugstringrequired

Slug of the server

Body

application/json
adminPasswordstring

Optional explicit admin password. If omitted, Webdock generates one and stores it as the wordpressadmin volatile credential.

dbHoststring

Optional MySQL host for the target database. Defaults to localhost when omitted.

Example: localhost
dbNamestring

Optional MySQL database name to use. Defaults to the effective dbUser when omitted.

Example: wordpress
dbPassstring

Optional MySQL password override. Must be provided together with dbUser. Omit both dbUser and dbPass to use stored server defaultdb credentials.

Example: secret
dbUserstring

Optional MySQL username override. Must be provided together with dbPass. Omit both dbUser and dbPass to use stored server defaultdb credentials.

Example: wordpress
emailstringrequired

Email address for the initial WordPress administrator account.

Example: admin@example.com
localestringrequired

WordPress locale code used for language packs, for example en_US or de_DE. Use a code supported by WordPress core language packs. See https://developer.wordpress.org/cli/commands/core/language/install/ and list available locales on a server with: wp language core list.

Example: en_US
pathstringrequired

Absolute filesystem path where WordPress should be installed.

Example: /var/www/html
titlestringrequired

WordPress site title.

Example: My WordPress Site
urlstringrequired

Public site URL that WordPress should use for home/siteurl during installation.

Example: https://example.vps.webdock.cloud
usernamestringrequired

Admin username for the initial WordPress administrator account.

Example: admin

WordPress installation initiated.

X-Callback-IDstringheader

CallbackID