WordPress

Integrate your Workflow with WordPress

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

Authentication

  1. Generate an Application Password in WordPress

    1. Go to your Wordpress Admin dashboard

    2. Go to the users index (i.e. mywordpress.com/wp-admin/users.php)

    3. Click on “Edit” on an administrator user profile to authenticate requests with

    4. Scroll down to the section “Application Passwords”

    5. Create a new Application Password with the name "AirOps"

    6. Save the generated password

    7. Save the user name of the user that holds the Application Password

  2. Add the Application Password to AirOps

    1. Find the section for WordPress integration and click the "Configure" button

    2. In the modal that appears, paste the saved user name and password

    3. Set the URL to your WordPress installation URL (i.e. https://example.com)

      • If your installation is under a path make sure to include the path (i.e. https://example.com/blog)

    4. Click "Add" to complete the setup

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.

  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?

Functions and Their Parameters

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).

Last updated

Was this helpful?