# WordPress (self-hosted)

> Push Mentionwell articles into a self-hosted WordPress site via the REST API and Application Passwords.

Mentionwell pushes articles into your WordPress site using the REST API and an **Application Password** — built into WordPress core, no plugin required. Your articles appear in `wp-admin` like any other post.

## What you need

- A self-hosted WordPress site (5.6 or newer — Application Passwords were added then).
- An admin / editor account.
- Pretty permalinks enabled (Settings → Permalinks → anything except "Plain").

## Setup (5 minutes)

1. In `wp-admin`, go to **Users → Profile** (or Users → All Users → your user).
2. Scroll to **Application Passwords**.
3. Name it "Mentionwell" and click **Add New Application Password**.
4. Copy the 24-character password — **WordPress only shows it once**.
5. Verify the API works: open `https://yoursite.com/wp-json/wp/v2/` in a browser. You should see JSON, not a 404.
6. In Mentionwell, paste the site URL, your username, and the application password into the WordPress integration card.

## What gets pushed

| Mentionwell field | Where it lands in WordPress |
|---|---|
| Title, slug, excerpt | Standard post fields |
| HTML body | Post content |
| Featured image | Uploaded to `/media`, attached as featured media |
| Tags | Created if missing, attached as post tags |
| Category | Created if missing, set as post category |
| JSON-LD | Injected as a `<script type="application/ld+json">` inside the post content (works regardless of SEO plugin) |
| Published date | Set as the post date; status is set to `publish` |

## Common failures

- **401** on push — wrong username or app password. The displayed password contains spaces; copy them in.
- **403** — a security plugin (Wordfence, iThemes, Cloudflare WAF) is blocking the REST API. Whitelist Mentionwell's outbound IP or relax the plugin's REST API rule.
- **404** on `/wp-json/` — pretty permalinks are off. Go to **Settings → Permalinks** and click Save (no changes needed).
- **No Application Passwords section in your profile** — your host disabled it. Add this to `wp-config.php`:

  ```php
  add_filter('wp_is_application_passwords_available', '__return_true');
  ```

  Or fall back to the JWT Authentication plugin.

## Caveats

- WordPress's KSES filter strips `<script>` and `<iframe>` tags from non-admin users. Either publish as Administrator, or whitelist what you need with the `wp_kses_allowed_html` filter.
- Yoast/Rank Math/SEOPress meta fields differ. JSON-LD inline in the body is the most portable approach (and what Mentionwell does by default).
- Multisite: each subsite has its own `/wp-json/` base.

## Want pull mode instead?

If you'd rather render Mentionwell posts inside a WordPress page without storing them in WP, see the older [WordPress quickstart](/docs/frameworks/wordpress).


---

Canonical URL: https://mentionwell.com/docs/publish/wordpress
Live HTML version: https://mentionwell.com/docs/publish/wordpress
Section: Publish to your CMS
Site index for AI ingestion: https://mentionwell.com/llms.txt
Full reference: https://mentionwell.com/llms-full.txt
