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

# Publish to your WordPress site

> Connect a self-hosted WordPress site and publish approved pages to it

Narrative publishes an approved page to your own WordPress as a draft, then
makes it public. Nothing is published until somebody presses publish, and the
address the page ends up at always comes from WordPress rather than from us.

## What you need

A **self-hosted WordPress**, version 5.6 or later. Application Passwords, which
is how Narrative authenticates, arrived in 5.6.

**HTTPS.** Narrative will not send a credential or your copy over a plain
connection, and refuses an `http://` address rather than downgrading quietly.

**An Editor or an Administrator.** Below Editor, WordPress either refuses the
write or strips parts of the body, so Narrative refuses at connect rather than
letting you find out at publish. The refusal names the role it found.

A **dedicated user called Narrative is recommended** but not required. It keeps
the byline honest, it makes the published pages easy to find under one author,
and revoking it later affects nothing else.

> [!NOTE]
>
> WordPress.com hosted plans are not supported. They do not expose the REST
> routes Narrative needs. Self-hosted WordPress, including WordPress installed
> through a host's one-click installer, is fine.

## Connecting

Open **Connectors**, find WordPress, press **Connect** and type your site
address. Narrative reads the site before it sends you anywhere, so a site it
cannot reach is refused while you are still looking at the dialog rather than
after a trip through your admin.

![The Connections page under Setup with the WordPress card marked Not connected and a Connect button, above the Google connectors.](https://mintcdn.com/narrative-22c775b1/PZsXhMAicRb_4VqN/images/product/wordpress-connector-card.png?fit=max\&auto=format\&n=PZsXhMAicRb_4VqN\&q=85\&s=637107e256fadaa260cbcc8fa441676a)

WordPress on the Connections page, offered as the recommended next step until it is connected.

![The Connect WordPress dialog with a site address field, an Approve in WordPress button and a Paste a password instead option.](https://mintcdn.com/narrative-22c775b1/PZsXhMAicRb_4VqN/images/product/wordpress-connect.png?fit=max\&auto=format\&n=PZsXhMAicRb_4VqN\&q=85\&s=6e93304f52a6d3463c5854bbc41eaba9)

Connect WordPress: the site address, then either approval on your own site or a pasted password.

Then one of two ways.

### By approving in WordPress

Press **Approve in WordPress**. You land on your own
`wp-admin/authorize-application.php`, which asks whether to let Narrative in.
Press **Yes, I approve**. WordPress mints an Application Password, hands it
back, and the window closes.

You never type a password and Narrative never sees one you chose.

### By pasting an application password

Some sites hide the approval screen, usually a security plugin, and some
proxies rewrite admin URLs so it cannot be reached. Pasting works everywhere.

In WordPress, go to **Users → Profile**, scroll to **Application Passwords**,
type `Narrative` as the name and press **Add New Application Password**.
WordPress shows the password once, in groups of four characters. Copy it.

Back in Narrative, press **Paste a password instead**, and fill in your site
address, your WordPress username and the password. The spaces do not matter.

## Choosing where pages go

After connecting, Narrative reads your site and asks three things.

**Posts or pages.** Whichever your blog or resource section uses. Changing it
later does not move pages already published.

**A category, or a parent page.** Optional. A category applies to posts, a
parent page to pages. Narrative only offers categories and pages that exist on
your site right now, so there is nothing to mistype.

**Who publishes.** The WordPress user whose name appears as the byline.

## What Narrative writes, and what it leaves alone

| | |
| - | - |
| Title | The page's title |
| Body | Your approved copy, as HTML |
| Excerpt | The meta description |
| Slug | The page's planned address |
| Author | The user you chose |
| Category or parent | If you set one |
| Language | If you have a translation plugin |

**Your SEO plugin keeps the title tag and the meta description.** Core
WordPress has no title-tag field, and the plugin that does own it, Yoast or
Rank Math, is the one your site is already set up around. Narrative fills the
excerpt and leaves the plugin's own fields untouched.

Narrative also adds two blocks of structured data: an `Article` node, and a
`FAQPage` node when your copy has a genuine question and answer section. Every
value in the `Article` node comes from WordPress's own answer, so it agrees
with what your SEO plugin reports.

> [!NOTE]
>
> On a site with an SEO plugin you will see two `Article` blocks in the page
> source. That is expected and correct. They are separate entities with separate
> identifiers, yours at `#article` and Narrative's at `#narrative-article`, and
> search engines read them as one page described twice in agreement rather than
> as a contradiction.

**Narrative does not touch tags**, does not upload images, and does not link
your Arabic and English versions to each other.

### What cannot be published

Raw HTML in the copy is refused by name rather than published. An approved page
is approved as words, and a tracking pixel or a script arriving inside it is not
something to pass through silently.

## Languages

If you have **Polylang, Polylang Pro or WPML**, Narrative tells WordPress each
page's language and the page lands in the right one. The free edition of
Polylang does this as well as the paid one.

Make sure the campaign's language is actually set up in your translation
plugin. If it is not, Narrative refuses to publish rather than letting the page
land silently in your site's default language, which is what WordPress would
otherwise do.

**With no translation plugin**, a site cannot be told a page's language from
outside. Narrative says so when you set the connector up: your Arabic and
English pages will publish together, without distinction.

## Republishing

Publishing the same page again edits the same post. It does not make a second
one, and the address does not change.

**It replaces edits made in WordPress.** If somebody changed the page in
`wp-admin`, Narrative's copy wins. WordPress keeps revisions, so their version
is recoverable under **Revisions** on that post.

One thing to know: on a page that is already public, the update changes the live
page as it happens. WordPress has no hidden draft of a published post, so there
is no staging step for a republish the way there is for a first publish.

If you **trashed or deleted** the post, Narrative publishes a new one rather
than failing.

> [!NOTE]
>
> Narrative does not notice a post you trashed until the next time you publish
> that page. A page you removed in WordPress still reads as live in Narrative
> until then.

## Changing a page's address

The last part of a planned address can be changed in Narrative up until the
page is actually live. Open the page settings above the draft and edit the
**Planned URL**. Lowercase letters, digits and hyphens.

Once the page is live its address is settled, and Narrative will tell you where
it is serving from rather than quietly moving it.

If another page of yours already uses that address, Narrative refuses it rather
than silently adding `-2`. You asked for an address, so a different one is not
an answer.

## When something is refused

Narrative writes a sentence for every refusal. The common ones:

**"Application Passwords are turned off on this site."** A security plugin
usually holds that switch. Wordfence, iThemes Security and All In One WP
Security all have one. Turn Application Passwords back on.

**"Something in front of this site refused the request."** A firewall, a
security plugin or your host is blocking Narrative. Allow the user agent
`NarrativeBot` and the WordPress REST API.

**"That username and application password were not accepted."** Either the
credential is wrong, or your server is stripping the `Authorization` header
before WordPress sees it. The second is common on Apache with CGI or FastCGI.
Adding this to `.htaccess` fixes it:

```apache theme={null}
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteRule .* - [E=HTTP_AUTHORIZATION:%{HTTP:Authorization}]
</IfModule>
```

**"This user is author, which cannot publish on your behalf."** Connect as an
Editor or an Administrator instead.

**"This site is not a WordPress site, or its REST API is turned off."** Some
plugins disable the REST API wholesale. Narrative needs it.

**"This site removes scripts for your role."** Your user cannot carry
structured data, so pages publish without Narrative's `Article` and `FAQPage`
blocks. The page itself is unaffected. Connecting as an Administrator, or as a
user with the `unfiltered_html` capability, resolves it.

## Disconnecting

Disconnecting in Narrative deletes the Application Password from your
WordPress, and destroys Narrative's copy of it either way.

If your site was unreachable at that moment, Narrative tells you so and the
password is still in your admin. Remove **Narrative** under **Users → Profile →
Application Passwords** to finish.

**Published pages stay up.** Disconnecting does not take anything down.

## Not supported

One WordPress site per brand. WordPress.com hosted plans. Images. Tags. Linking
translated versions to each other. Writing Yoast or Rank Math fields. Taking a
live page down from Narrative.


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