About WordPress sites
View as MarkdownWhat a WordPress site on the Hosting API is, how it differs from a Node.js app, how it moves from created to live, and what you need before you create one.
Overview
This page explains WordPress sites (appType=MHWP) on the Hosting API v1. It covers what a site is, who it's for, how it differs from a Node.js app, and what you need first.
A WordPress site is a managed WordPress install that lives inside an Airo App Builder subscription. GoDaddy runs the server, PHP, and WordPress for you. You create the site and take it live through the API, and you build its content in WordPress admin.
Use the API when you want to create and publish WordPress sites from code or scripts instead of in Airo. The API covers the site's lifecycle: create, publish, rename, and delete. It doesn't edit site content.
Who it's for
WordPress sites are for developers with an Airo App Builder subscription who want a managed WordPress site. If you deploy your own code, use a Node.js app instead.
How WordPress sites differ from Node.js apps
Both products share the /v1/hosting base path, the token scopes, and the async operation model. The appType query parameter picks the product. The following table lists the differences:
Node.js app (NODEJS) | WordPress site (MHWP) | |
|---|---|---|
| What you host | Your own code, uploaded as a zip | A managed WordPress install |
| Subscription | A web hosting plan, attached before you publish | An Airo App Builder subscription |
| Variants | preview and publish | publish only |
| Go live | Create a deployment | Set the publish state |
| Update | Rename and change rootPath | Rename only |
| Deployments, restarts, source imports, secrets, logs, domains, and subscriptions | Yes | No: these return 501 NOT_APPLICABLE |
Go to Troubleshoot Hosting for the full list of operations that return 501 for WordPress sites.
Lifecycle
A new site starts unpublished, behind a holding page. PUT /v1/hosting/apps/{appId}/publish-state with {"published": true} takes it live, and {"published": false} puts the holding page back. Create and publish-state changes are async: each returns an AppOperation that you poll with GET /v1/hosting/app-operations/{operationId}.
The following diagram shows how a site moves through its states:
GET /v1/hosting/apps/{appId} reports the site's lifecycle in status: CREATING, ACTIVE, FAILED, DELETING, SUSPENDED, or UNKNOWN. Publish state is separate, so an ACTIVE site can be live or unpublished. Treat UNKNOWN, and any value your code doesn't recognize, as undetermined, not healthy.
The API returns no WordPress admin credentials. Sign in to WordPress admin from Airo to set the site title and add content.
Requirements
The following table lists what you need before you create a WordPress site:
| You need | Why |
|---|---|
| An active Airo App Builder subscription | Every WordPress site lives inside one |
| A free app slot on the subscription | Each site uses one slot |
| WordPress sites turned on for your account | A create returns 403 WORDPRESS_NOT_ENABLED without it |
| A plan with a free published-site slot, to publish | The plan sets how many sites can be live at once. The free plan allows none |
| A Personal Access Token with the scopes for each task | hosting.application:create to create, hosting.application:read to read, hosting.application:update to rename, hosting.application:delete to delete, and hosting.deployment:execute to publish or unpublish |
Go to Set an application's publish state for how the publish limit is checked. Go to Troubleshoot Hosting for the error each unmet requirement returns.
Related
Last updated on
How is this guide?