Skip to main content
WordPress

Deploy and prepare WP-CLI for API WordPress management

Asynchronous Request

Deploys and prepares WP-CLI on the server and registers a pending WordPress install record in Webdock metadata.

You must call this before using install/update/check/register endpoints. Optional path/url fields let you also link an existing installation in the same call.

Profile prerequisite: Managed WordPress operations require a server profile where wordpressManagementIncluded=true. Discover profiles with GET /profiles (or exact lookup via profileSlug) before provisioning, and do not provision an ineligible profile expecting to use managed WordPress later. If the server already exists on an ineligible profile, this operation is rejected.

POST
/servers/{serverSlug}/wordpress/setup-cli
Authorizationstringheaderrequired

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

serverSlugstringrequired

Slug of the server

Body

application/json
pathstring

Optional absolute path to an already-installed WordPress instance, for example /var/www/html. If provided, Webdock links this install while queuing WP-CLI setup.

urlstring | null

Optional public URL for the existing installation, for example https://example.com. Ignored if path is omitted.

WP-CLI setup initiated.

X-Callback-IDstringheader

CallbackID