> For the complete documentation index, see [llms.txt](https://docs.airops.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.airops.com/integrations/overview/integrations/wordpress.md).

# WordPress

Integrate your Workflow with WordPress

<figure><img src="https://3762890407-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FX2n5yPRPynbnWuO4SH0M%2Fuploads%2Fgit-blob-f186ac1c84c315b8445c1f624b6087f4ad58cca1%2Fwordpress-step-01-create-post.png?alt=media" alt="WordPress Integration step with the Create Post action, the blog URL, an author ID, and a title and content from an earlier step"><figcaption><p>Create WordPress posts from a Workflow.</p></figcaption></figure>

The WordPress Integration allows you to manage posts on your WordPress site.

## Authentication

1. **Generate an Application Password in WordPress**
   1. Log into your Wordpress admin dashboard
   2. Navigate to **Users** → **Edit** (Administrator account)
   3. Scroll down to **Application Passwords**, add a new one named "AirOps Integration" or similar
   4. Copy the generated password (it won't appear again)
   5. Save your WordPress username, not the label you created but the actual login username
2. **Link WordPress inside AirOps**
   1. Log into your AirOps workspace, go to **Account** → **Integrations** → **Add New** → **WordPress**
   2. In the modal that appears, enter
      1. Username (your WordPress login)
      2. Password (the Application Password you generated)
      3. Site URL (include the full path if your site is in a subdirectory, e.g. `https://example.com/blog`)
   3. Click "Add" to finalize the connection

<figure><img src="https://3762890407-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FX2n5yPRPynbnWuO4SH0M%2Fuploads%2Fgit-blob-701d3ee0390cfc29b71b74c65fda5e69cf865926%2Fwordpress-step-02-authentication.png?alt=media" alt="Connect WordPress dialog with Authentication name, URL, Username, Password, and Expiration date fields and a Save credentials button"><figcaption><p>Connect WordPress with your site URL, username, and an Application Password.</p></figcaption></figure>

**Security Note:** Treat your Application Password like a normal password. It provides REST API access to your WordPress site, and it should not be shared. Store it securely and only use it in server-side or secure/authenticated environments.

### FAQ

1. Why can't I see Application Passwords when editing a user?
   * Application Passwords are available from WordPress 5.6 onwards
   * Most security plugins control whether this feature is enabled or not. Check your Security plugins and configure them so that Application Passwords is enabled.
   * If you use Solid Security plugin [follow this guide](https://help.solidwp.com/hc/en-us/articles/204489650-Solid-Security-Application-Passwords).
2. I created an Application Password but I can't see the generated password.
   * This usually happens when a plugin overrides css/js in Wordpress. In order to see the password you need to follow these steps:
     1. Go to the user profile where you want to create an Application Password
     2. Open the Dev Tools in your browser (right click then inspect)
     3. Fill the input for the Application Password name and submit it
     4. Open the console tab in the Dev Tools
     5. Paste the following Javascript line: `document.querySelector('.new-application-password-notice input').value`
     6. Save the value, this is your password
3. Where can I find more information about Application Passwords?
   * Official docs here<https://make.wordpress.org/core/2020/11/05/application-passwords-integration-guide/>

## Functions and Their Parameters <a href="#functions-and-their-parameters" id="functions-and-their-parameters"></a>

### Post status defaults

When you select **Create Post** or **Update Post** in a new step configuration, **Status** starts as **Draft**. Choose the status you want before running the Workflow. Opening an existing saved step preserves its configured status, including an empty value.

{% hint style="warning" %}
Running **Update Post** with **Draft** selected changes a published post back to a draft and takes it offline. Choose a publishing status before running if the post should remain live.
{% endhint %}

### **Create Post**

#### **Required**

1. Title
2. Content (HTML)

#### Optional

1. WordPress URL
   * Leave empty to use the URL from your WordPress workspace's credentials
   * The URL to your WordPress site (i.e. mywordpress.com/blog). If you are using a Network of sites (WordPress MultiSite) this is the URL to one of your sites (not the network).
2. Author ID
3. Excerpt
4. Slug
5. Featured Media ID
6. Meta
7. Template
8. Post Type
   1. Leave empty to use the default type "posts".
   2. When using a custom post type:
      1. Specify the REST API base slug or the plural version of your custom post type. i.e. "authors", "items", ...
      2. Make sure the custom post type is visible to the REST API. This can be configured via your plugin of choice for custom post types.
9. Categories
10. Advanced Custom Fields Data
    1. From the Advanced Custom Fields plugin.
    2. Leave empty to ignore.
    3. Field expects JSON data.
    4. Field group must have Show In Rest API setting enabled.

### **Update Post**

#### **Required**

1. Post ID

#### Optional

When an optional attribute is empty, it will not be updated in WordPress.

1. WordPress URL
   * Leave empty to use the URL from your WordPress workspace's credentials
   * The URL to your WordPress site (i.e. mywordpress.com/blog). If you are using a Network of sites (WordPress MultiSite) this is the URL to one of your sites (not the network).
2. Author ID
3. Title
4. Content (HTML)
5. Excerpt
6. Slug
7. Featured Media ID
8. Meta
9. Template
10. Post Type
    1. Leave empty to use the default type "posts".
    2. When using a custom post type:
       1. Specify the REST API base slug or the plural version of your custom post type. i.e. "authors", "items", ...
       2. Make sure the custom post type is visible to the REST API. This can be configured via your plugin of choice for custom post types.
11. Categories
12. Advanced Custom Fields Data
    1. From the Advanced Custom Fields plugin.
    2. Leave empty to ignore.
    3. Field expects JSON data.
    4. Field group must have Show In Rest API setting enabled.

### **Upload Image**

#### **Required**

1. Image URL
   * The URL to the image you want to upload into WordPress.
   * Allowed image types are JPG, PNG, GIF and WEBP.

#### Optional

1. WordPress URL
   * Leave empty to use the URL from your WordPress workspace's credentials
   * The URL to your WordPress site (i.e. mywordpress.com/blog). If you are using a Network of sites (WordPress MultiSite) this is the URL to one of your sites (not the network).


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://docs.airops.com/integrations/overview/integrations/wordpress.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
