# Ringbot WordPress Forms Sync Operations

This document covers the plugin-side recovery path for form sync issues between Ringbot and WordPress.

## Rotate the sync secret without reinstalling the plugin

Use this flow when the WordPress install should keep its plugin setup but needs a fresh Ringbot binding or secret material.

1. In WordPress, open `Ringbot AI Chat Voice Agent -> Setup`.
2. Click `Disconnect`.
3. In Ringbot, generate a fresh WordPress Setup Key for the same site.
4. Back in WordPress, paste the new Setup Key and click `Connect to Ringbot`.
5. Open `Forms` and click `Sync now`.
6. Confirm the latest forms arrive and that `Recent activity` shows successful updates.

Expected result:

- The plugin keeps its local display settings and editor content.
- WordPress receives a fresh `install_id` / `site_token` binding from Ringbot.
- Reinstalling the plugin is not required.

## Investigate replay or signature mismatch issues

Use this flow when the Forms screen or sync logs show `Signature check failed`, `Timestamp check failed`, or repeated rejected deliveries.

1. In WordPress, open `Ringbot AI Chat Voice Agent -> Forms`.
2. Review `Sync health`, `Recent issues`, and `Recent activity`.
3. Confirm the site is still connected from `Ringbot AI Chat Voice Agent -> Setup`.
4. Click `Revalidate installation` in `Diagnostics`.
5. Return to `Forms` and click `Sync now`.
6. If failures continue, disconnect the site and reconnect with a fresh WordPress Setup Key.

Check these conditions during investigation:

- WordPress server time is correct and not drifting by more than a few minutes.
- The site is connected to the expected Ringbot workspace and environment.
- Reverse proxies, WAF rules, or security plugins are not stripping `X-Ringbot-*` headers.
- The current site is not receiving deliveries intended for a different `install_id`.

When to reconnect:

- The install was cloned from another environment.
- The site token may have been replaced or corrupted.
- Signature failures continue after `Revalidate installation` and `Sync now`.

## Recover a stale or missing form snapshot

1. Save the form again in Ringbot.
2. In WordPress, click `Sync now`.
3. If the form is still missing, run `Revalidate installation`.
4. If the form status is `archived` or `disabled`, restore it in Ringbot first.
5. If a stale unavailable form no longer matters, remove the local copy from the Forms screen.

## Operator checklist

- Keep WordPress and Ringbot on the expected production domains.
- Revalidate after DNS, proxy, CDN, or WAF changes.
- Use `Sync now` before assuming a snapshot is missing permanently.
- Prefer reconnecting over reinstalling when rotating credentials or recovering a broken binding.
