---
title: Websites and articles
description: "Connect a website (a WordPress site, WordPress.com, DEV or Hashnode), and publish articles to it from Peal: a title, a formatted body, a featured image, tags and categories, at once, as a draft, or at a time."
sidebar:
  icon: newspaper
---

A website is a channel too, but it takes **articles** instead of posts. An article has a title, a formatted body, an excerpt, tags, categories and a featured image, and Peal sends it to the site as one of the site's own posts.

You can connect four kinds of website:

| Website                                | Connects with                                   | Its page                                  |
| -------------------------------------- | ----------------------------------------------- | ----------------------------------------- |
| A WordPress site of your own           | Its address, a user and an application password | [Below](#connect)                         |
| WordPress.com, and Jetpack sites there | Signing in on WordPress.com                     | [WordPress.com](/platforms/wordpress-com) |
| DEV                                    | An API key                                      | [DEV](/platforms/devto)                   |
| Hashnode, on its Pro plan              | A personal access token and the publication     | [Hashnode](/platforms/hashnode)           |

A website counts as one channel, like any connected account. On a plan priced per account, it's one account.

## Connect a WordPress site [#connect]

Peal publishes as one of the site's users, with an **application password**. That's a password WordPress makes for one application, which the user can revoke at any time. It's never the user's own password.

You need WordPress 5.7 or later, on a site served over HTTPS. Application passwords came with 5.6, and 5.7 lets Peal find a post by when it changed.

1. **Make an application password**

    In WordPress, open **Users**, then the profile of the user Peal publishes as. That user must be an Author, an Editor or an Administrator. Under **Application Passwords**, name it Peal and click **Add New Application Password**. Copy the password it shows, because it's shown once.

2. **Connect the site in Peal**

    In **Channels**, under **WordPress website**, type the site's address (its home page, such as `https://blog.example.com`), the user's login name and the application password. Then click **Connect the website**.

Peal finds the site's REST API from its home page, and checks that the user may publish posts and upload files. It then keeps the password encrypted and never shows it again. It sends the password only to the REST API of the site itself, never to one the home page names elsewhere.

Connecting the same site again, at the same home page, replaces the password. That works even when its REST API moved, as it does when its permalinks change.

A new website needs room in the workspace's plan, which Peal checks before it calls the site. A workspace can try 30 times an hour at most.

Peal reaches websites over HTTPS at public addresses only. A site on a private network needs its server's operator to allow it ([PEAL_OUTBOUND_ALLOWED_HOSTS](/self-hosting/environment-variables#channels)). Peal's own service never does.

### When connecting fails [#errors]

If connecting fails, Peal shows one of these messages:

| Message                                                     | What to do                                                                                                      |
| ----------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------- |
| The address leads to no WordPress site                      | Give the site's home page. A site whose REST API is turned off by a plugin can't be connected.                  |
| Peal reaches websites over HTTPS, at public addresses only  | Serve the site over HTTPS, on a public address, with its REST API on the same site.                             |
| The site refused the user name and the application password | Check both. Some hosts strip the `Authorization` header that carries them, so ask your host to pass it through. |
| This user may not publish posts or upload files             | Use an Author, an Editor or an Administrator.                                                                   |

When the site later refuses the password, as it does after the password is revoked, the channel is marked **Reconnect**. Reconnect it with a new application password.

## Connect WordPress.com, DEV or Hashnode [#other-sites]

Each of these connects from **Channels** in its own way:

- A site on WordPress.com: sign in on WordPress.com and pick the site.
- An account on DEV: paste an API key.
- A publication on Hashnode: paste a personal access token and give the publication's address.

Each platform's page says where to make the key: [WordPress.com](/platforms/wordpress-com), [DEV](/platforms/devto), [Hashnode](/platforms/hashnode). Peal keeps the key or the token encrypted, and never shows it again. A site or an account counts as one channel, and a new one needs room in the workspace's plan.

If connecting fails, Peal shows one of these messages:

| Message                                         | What to do                                                                                                                                               |
| ----------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------- |
| The site refused what Peal signs in with        | Make a new key or token, and paste it whole.                                                                                                             |
| You have several publications on Hashnode       | Give the address of the one to publish to.                                                                                                               |
| Hashnode has no such publication                | Give its address, such as `blog.example.com` or `name.hashnode.dev`.                                                                                     |
| Hashnode answers its API only on its Pro plan   | Upgrade the publication on Hashnode, then connect it again.                                                                                              |
| This user may not publish posts or upload files | On WordPress.com, sign in as an Author, an Editor or an Administrator of the site. On Hashnode, a team's publication needs you as an owner or an editor. |

## What each site takes [#sites]

Each site sets its own limits:

| Website                  | Title          | Tags                  | Categories | On the site                                       | Unpublish                    |
| ------------------------ | -------------- | --------------------- | ---------- | ------------------------------------------------- | ---------------------------- |
| WordPress, WordPress.com | 500 characters | 20                    | 20         | Published at once, a draft there, scheduled there | To the site's trash          |
| DEV                      | 128 characters | 4, letters and digits | None       | Published at once, a draft there, scheduled there | Back to a draft there        |
| Hashnode                 | 500 characters | 15                    | None       | Published at once, a draft there                  | Removed from the publication |

A WordPress site gets the article's HTML, which Peal writes itself. DEV and Hashnode get Markdown, which Peal writes too, and everything you typed stays text. Each image goes to the site first, once.

## Write an article [#articles]

In a workspace, click **Blogs** in the sidebar. It lists the workspace's websites: click one to see its articles, then click **New article**. The article starts on that website, and **Website** can still change it. Then fill in the article:

- **Title**: what the site shows above the article.
- **Body**: written in the editor, with headings, paragraphs, bold, italic, struck and code text, links, lists, quotes, separators, code blocks and images from the workspace's [media library](/guides/media). What you paste keeps only those.
- **Excerpt**: the summary the site shows in lists.
- **Tags** and **Categories**: separated by commas, as the site shows them. Peal uses the ones the site has, whatever their case, and makes the others. Making a category needs an Editor or an Administrator.
- **Featured image**: an image from the library.

Peal writes the HTML the site gets from the body itself, and sends each image to the site's media library first.

## Send it [#send]

Under **On the site**, choose what the site makes of the article:

| On the site       | What the site does                                                                    |
| ----------------- | ------------------------------------------------------------------------------------- |
| Published at once | Publishes it as soon as Peal sends it.                                                |
| A draft there     | Keeps it as a draft, for you to finish and publish on the site.                       |
| Scheduled there   | Publishes it itself at the article's time. Peal sends it at once, and the site waits. |

Then choose when Peal sends it. Leave **Time** empty to send it now, or set one, and Peal sends it then. Hashnode can't publish an article at a time itself, so give it a time with **Published at once**, and Peal sends it then.

Before an article is scheduled, Peal checks everything at once:

- It has a title and a body.
- Its tags and categories are ones [its site takes](#sites).
- Its time is still ahead.
- The library still has its images.

The title and the excerpt go to the site as plain text, as you typed them.

### Rate limits [#rate-limits]

DEV takes one write a second from a server, whatever account it's for, and 10 image uploads an hour from an account by default. Peal sends its writes to DEV one at a time, a second apart. An article that hits the one-second limit waits for DEV, then goes.

Hashnode may answer a search from a cache about 25 seconds old. An article sent again within a minute of the call it looks for waits, then looks.

### What else holds an article back [#held]

A workspace over its plan, as after its trial, sends no article until it's back within it, as for its posts.

An image that a scheduled article shows can't be deleted from the library until the article is back to draft or has gone out. Deleting one that a draft, a failed article or an article to check shows takes it off that article.

### When the site's answer is lost [#lost-answer]

What goes out is public, so Peal never sends an article twice.

When the site's answer is lost, Peal looks for the post among the user's posts, by its title, and takes it when exactly one matches. When it can't tell, the article shows **To check**. Look on the site, and send it again only if it isn't there.

When you send it again, Peal first looks for that post once more. It searches the user's posts of that title made or changed within a day of the first send, and takes the post when it finds exactly one. When it finds several, or the site refuses the search, the article stays **To check**.

When the site holds another article with the same title, Peal can't tell it from the one it sent. The article says so, and Peal never sends it again by itself. Look on the site. If the article is there, it's live and you can leave it. If it isn't, rename or delete the other article there, then send it again.

## Once it's on the site [#on-site]

From the article in Peal, you can:

- Click **Update on the site** to send the title, body, excerpt, tags, categories and featured image again over the site's post, at once. A featured image or an excerpt removed in Peal is removed there. The site keeps the post's status and date, and images the site already has aren't sent again.
- Click **Unpublish** to move the post to the site's trash, which WordPress empties after 30 days by default. The article stays in Peal, shown as in the site's trash.
- Click **Send again** to send a failed article again, at once.

**Unpublish** works differently on some sites. A site whose trash is turned off refuses it, so delete the post there. DEV deletes no article through its API, so there the article becomes a draft again. On Hashnode, the post is removed from the publication.

Deleting an article in Peal leaves its post on the site.

## Approvals [#approvals]

Articles can't be approved yet. In a workspace whose posts wait for an approval (see [Which posts wait](/guides/posts/review#policy)), anything that would put an article on its site, or change it there, is refused for whoever's posts would wait. That covers:

- Sending it, scheduling it and sending it again.
- Editing it while it's scheduled.
- Updating it on the site.

Drafts can still be written, and an article can still leave its site. Someone whose posts go out without an approval can send it.

## In the API [#api]

The [articles endpoints](/reference) do the same:

- `POST /api/v1/channels/websites` connects a WordPress site.
- `…/channels/websites/keys` connects an account on DEV or Hashnode.
- `…/channels/websites/sign-in/wordpressCom` starts signing in to WordPress.com.
- `/api/v1/articles` writes, schedules, sends again, updates and unpublishes articles.

The webhook events [`article.published` and `article.failed`](/developers/webhooks/events/articles) tell you how each one ended. The command line has `peal channels connect-website`, `peal channels connect-website-key` and `peal articles`.
