WordPress Plugin Guide

Install and configure the HQ Connector plugin on your WordPress site.

Installation

  1. Download the hq-connector plugin from the plugins page
  2. In WordPress admin, go to Plugins → Add New → Upload Plugin
  3. Upload the ZIP file and click Install Now
  4. Click Activate Plugin

Configuration

  1. Go to Settings → HQ Connector
  2. Enter your Hub URL (e.g., https://hub.your-agency.com)
  3. Enter the API Token generated by the Hub
  4. Click Save Settings

Creating Tokens

On the Hub side, create a token for this WordPress site:

php artisan connector:token my-hub --name=client-site --scopes=posts:write,posts:media

Copy the plaintext token — it's shown only once. Paste it into the WordPress plugin settings.

How It Works

The plugin registers REST API routes under /api/connector/ that mirror the Connector Protocol:

EndpointWordPress Function
POST /postswp_insert_post()
PATCH /posts/{id}wp_update_post()
DELETE /posts/{id}wp_delete_post()
POST /mediawp_handle_upload()
POST /posts/{id}/mediawp_insert_attachment()

Post Meta Storage

SEO metadata is stored in post meta with _hq_ prefix:

Idempotency

The plugin maintains a hq_connector_post_mappings table that maps hub_post_id → WordPress post ID. Pushing the same hub_post_id twice updates the existing post instead of creating a duplicate.

Troubleshooting

Connection fails

Posts not appearing