# Connect a WordPress website

SiteHome lets the people who manage a website edit and publish its content from their phone. For a WordPress website you need an application password to connect; with it you can view and edit content and save drafts. To publish, SiteHome also needs the SiteHome plugin, which you can install before connecting or later. Both are done in WordPress's own admin, without a developer, in about five minutes.

## 1. Install the plugin

1. In WordPress, go to **Plugins → Add Plugin** and search for **SiteHome** (by **bkeetman**).
2. Click **Install Now**, then **Activate**.

SiteHome is available in the [WordPress.org plugin directory](https://wordpress.org/plugins/sitehome/). Requires WordPress 6.0 and PHP 7.4 or newer. You can also download the ZIP from that page and use **Upload Plugin**.

With WP-CLI: `wp plugin install sitehome --activate`.

## Updates

WordPress shows an update notice under **Plugins** or **Dashboard → Updates** when a newer version is available. Choose **Check again** to refresh the check. To install future updates automatically, choose **Enable auto-updates** next to SiteHome under **Plugins**; your host may manage this setting.

## 2. Create an application password

1. Use a WordPress user with the **Editor** role (or Administrator) for SiteHome: your own user, or a new one.
2. Go to **Users → Profile** and scroll to **Application Passwords**.
3. Enter the name `SiteHome`, click **Add Application Password**, and copy the password.

Application passwords only work over https. You can revoke the password there at any time; SiteHome then can no longer read or change the website.

## 3. Connect in SiteHome

Under **Settings → SiteHome** in WordPress, choose **Connect with SiteHome** (plugin 0.7.0 or newer). SiteHome opens with the website address filled in; sign in if needed. With an older plugin, open **Connect website → WordPress** in the SiteHome app. Enter your website's address, the username and the application password. SiteHome checks the user's role and whether the plugin is there, shows the content types with published items, and connects the ones you choose. Publishing starts switched off until an administrator switches it on. Without the plugin the website shows as partly connected (yellow): switching publishing on checks the website for the plugin again first.

## What the plugin does

- A revision check on SiteHome's updates: if an item changed after it was reviewed in SiteHome, WordPress refuses the update (409) and SiteHome asks for a new review. Updates from the block editor or other apps are not affected.
- A read-only `sitehome_revision` field on items in the REST API (only for users who may edit them), and `GET /wp-json/sitehome/v1/status`.
- **Settings → SiteHome** with these connection steps.
- It adds no tables, changes no content and makes no outgoing requests. SiteHome reads and publishes through WordPress's normal REST API, with your users and rights. Every change is a normal update with a revision you can restore.

## What SiteHome edits

Published posts, pages and custom post types that show in the REST API (`show_in_rest`): the title, the excerpt, the featured image, the block content, and the categories, tags and other taxonomies (chosen from the website's existing terms). In the content, paragraphs, headings, quotes and lists can be edited, with bold, italic, strikethrough, inline code and links. Other blocks (images, buttons, columns, embeds, blocks with their own settings such as alignment or colours) are shown and can be moved or removed, but are written back exactly as they were.

With the plugin (0.4.0 or newer), SiteHome also edits Advanced Custom Fields (ACF) of common types: text, text area, number, email, link, yes/no, date, choices and image. ACF fields with a condition, a read-only setting or a check of the website's own stay closed, as do repeaters, flexible content and relationships.

Not yet edited: the address (slug), new terms (create them in WordPress first), other custom fields, and content from the classic editor. Pages built with a page builder (Elementor, Divi, WPBakery, Beaver Builder, Oxygen, Bricks) keep their layout and text in the page builder's own data; the plugin tells SiteHome, which then leaves the content alone and lets you edit the title, excerpt, featured image, categories and tags.

## If connecting does not work

- **SiteHome cannot reach the API**: a security plugin (such as Wordfence or iThemes Security) or the host blocks the REST API or application passwords. Allow both for the SiteHome user.
- **WordPress doesn't accept the details, but they are right**: some hosts drop the `Authorization` header before WordPress sees it, and WordPress then answers as if the password were wrong. The SiteHome plugin (0.3.0 or newer) reads the details from SiteHome's own header instead and tells SiteHome whether they arrived. Without the plugin, ask your host to pass the `Authorization` header on to PHP.
- **The username or password is not accepted**: use the WordPress username (not the email address) and the application password, not the normal password.
- **The user may not edit all content**: give the user the Editor or Administrator role.

## For developers and AI coding assistants

Custom post types need `'show_in_rest' => true` to appear in SiteHome, and `supports` decides which of title, excerpt, editor and thumbnail SiteHome shows. Install and activate the plugin, then create an application password for an Editor. Do not change other plugins or settings.
