> ## Documentation Index
> Fetch the complete documentation index at: https://vexidata.com/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# WordPress

> Connect your WordPress site to VexiData to read and manage posts, pages, media, and comments with your AI assistant.

Connect your WordPress site and your AI assistant can answer questions about posts, pages, media, comments, categories, tags, and users — and, for anyone with write access to the connection, create and change content. WordPress connects with an Application Password instead of OAuth.

## Prerequisites

* A self-hosted WordPress site (version 5.6 or newer) served over **HTTPS** at a publicly reachable address — Application Passwords only work over HTTPS, and VexiData rejects plain `http://` sites
* A WordPress user whose role covers what the AI should do: **Editor** for posts, pages, media, and comments, or **Administrator** if it should also manage users or site settings. The AI can never do more than this user can
* The **Connect sources** capability in your VexiData organization, to connect the platform — Owners and Admins have it by default

> [!NOTE]
>
> VexiData connects to your site from the public internet, so it refuses
> addresses that only exist on your own machine or network: `localhost`,
> hostnames ending in `.local` or `.internal`, private IP addresses, and
> hostnames that don't resolve or that resolve to a private address. A local
> development site can't be connected. Use a staging or live site with a
> public HTTPS address instead.

> [!NOTE]
>
> Sites hosted on WordPress.com use a different sign-in flow that VexiData
> doesn't support yet. A WordPress.com site on a plan that allows plugins
> behaves like a self-hosted site and connects with an Application Password.

## Connect WordPress

**1. Create an Application Password in WordPress**

1. Sign in to your WordPress admin as the user the AI should act as, and go to **Users** > **Profile**
2. Scroll to **Application Passwords**, enter a name (for example, `VexiData`), and click **Add New Application Password**
3. Copy the password WordPress shows — it appears only once. The spaces in it don't matter

**2. Add the connection in VexiData**

Go to the [**Integrations**](https://vexidata.com/integrations) page in VexiData, click **Connect** on **WordPress**, and fill in:

| Field | Value |
| - | - |
| **Site URL** | Your site's address, for example `https://example.com`. A site installed in a subdirectory, such as `https://example.com/blog`, works too |
| **Username or email** | The WordPress username (or email) the Application Password belongs to |
| **Application password** | The password you copied |

**3. Test and connect**

Click **Test connection** to check the credentials without saving, then click **Connect**. VexiData signs in to your site's REST API as that user again before saving, and names the connection after your site's domain. If the test fails, work through the [troubleshooting](#troubleshooting) section below.

## Managing the connection

To connect more sites, click **Add account** on the WordPress card on the [**Integrations**](https://vexidata.com/integrations) page — each site keeps its own URL and credentials.

The connection with the **Primary** badge is the primary, which tools use when a request doesn't name one. To change it, open another connection and click **Make primary** in its **Connection** card.

To rotate credentials, revoke the Application Password in WordPress, create a new one, and connect the same site URL again — VexiData updates the existing connection. To remove a site, open its connection and click **Disconnect** in the **Connection** card.

## What the AI can do

| Tool | What it does | Access |
| - | - | - |
| `wordpress_read` | Reads site content — posts, pages, media, comments, categories, tags, users, and settings. | Read |
| `wordpress_write` | Creates or updates content, such as drafting a post, editing a page, or approving a comment. | Write |
| `wordpress_upload_media` | Adds a file from a public URL to the media library, for example a featured image. | Write |
| `wordpress_delete` | Deletes content — to the trash by default, or permanently when you ask for that. | Destructive |

> [!WARNING]
>
> `wordpress_write`, `wordpress_upload_media`, and `wordpress_delete` act on
> your live site. New posts and pages are saved as drafts unless you ask the
> AI to publish, and deletions go to the trash unless you ask for permanent
> removal — still, review what the AI proposes before approving a change.
> All three need **Write** access on the connection — by default, Owners and
> Admins. Members can use `wordpress_read` only.

> [!NOTE]
>
> The AI acts as the WordPress user behind the Application Password, so
> WordPress applies that user's role: a Contributor can't publish, an Author
> only edits their own posts, and only an Administrator can manage users or
> settings. Plugins and themes can't be installed or changed through
> VexiData.

## Troubleshooting

> [accordion] Connection test fails
>
> * Confirm the site URL is correct and starts with `https://`. Pasting the admin address (ending in `/wp-admin`) or the API address (ending in `/wp-json`) is fine — VexiData trims it
> * If the error says the site URL points to a blocked host or a private network address (or resolves to one), VexiData can't reach the site from the public internet — see the note under [Prerequisites](#prerequisites)
> * Check your SSL certificate is valid and not expired
> * Some security plugins and firewalls block REST API requests — allow requests to `/wp-json/`

> [accordion] Authentication errors (401)
>
> * Use an **Application Password**, not the user's login password, and make sure you copied all of it
> * If the error says WordPress never received the credentials, your host drops the `Authorization` header before it reaches WordPress. On Apache, add this line to the site's `.htaccess`, right after `RewriteEngine On`:
>
>   ```apache theme={null}
>   RewriteRule .* - [E=HTTP_AUTHORIZATION:%{HTTP:Authorization}]
>   ```
>
>   On other hosts, ask support to pass the `Authorization` header through to PHP
> * If the error says Application Passwords are disabled, the site isn't served over HTTPS or a security plugin switched them off — enable them in the plugin's settings
> * If the password was revoked, create a new one and connect the site again with it

> [accordion] The AI gets 403 errors on writes
>
> WordPress refuses actions the connected user's role doesn't allow — for example, a Contributor publishing a post or an Author editing someone else's. Create the Application Password for a user with the **Editor** role (or **Administrator** for users and settings) and connect the site again.

> [accordion] REST API returns 404
>
> WordPress's REST API needs pretty permalinks. In WordPress, go to **Settings** > **Permalinks** and pick any structure except "Plain", then save. If `https://your-site.com/wp-json/` still shows a 404 or an error page, a firewall or security plugin is blocking it.

> [accordion] Tools don't appear in my AI client
>
> Tools register as soon as the platform is connected, but some clients cache the tool list. Reload or reconnect the VexiData connector in your AI client.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.