=== Kuvarssoft Continuity ===
Contributors: kuvarssoft
Tags: replication, backup, mirror, disaster recovery, media sync
Requires at least: 5.8
Tested up to: 7.0
Requires PHP: 7.4
Stable tag: 1.0.0
License: GPLv2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html

Real-time one-way replication for WordPress. Keep a second site continuously in step with your live site — database and media.

== Description ==

Kuvarssoft Continuity mirrors your live WordPress site to a second WordPress site as changes happen. You pick two sites: your live site (the **source**) and a second site (the **backup**). From then on Continuity keeps the backup in step with the source automatically, in the background, through hook-driven one-way replication.

Instead of an occasional snapshot, you get a second site that is always current.

**Everything below is included and fully functional. No accounts, no keys, no quotas, no expiry.**

= Database replication (real-time) =

* Posts, pages and every custom post type, with all of their meta.
* Comments and their status.
* Users, roles and user meta.
* Site options (safe ones only — never siteurl, home, active plugins, theme, admin email, auth keys or cron).
* Pushed the instant you hit save — no button, no waiting.

= Media replication (real-time) =

* Every upload is copied to the backup, including the untouched original, the scaled image and every thumbnail size WordPress generates.
* Files of any size: large files stream across in memory-safe chunks and are sha256-verified on arrival, so a big video never exhausts PHP memory.

= Live dashboard =

* Transfer counters for today, this week and this month, plus live rate and peak rate.
* Success rate, 24-hour error count, the most recent error, and a live replication animation.
* Peer ping (round-trip latency) and a link-speed test between the two sites.

= Pause =

* Pause and resume replication from the dashboard for maintenance windows.

= Kuvarssoft Continuity Pro =

Replication is complete in this plugin — everything above works with no account, no keys and no expiry. **Kuvarssoft Continuity Pro** is a separate plugin, sold from kuvarssoft.com and installed alongside this one, for the things this one does not do: instant failover (promote the backup to a standalone site when the source goes down, with a guided return), scheduled replication windows (batch the database every N minutes, move media in one nightly pass), on-demand resync (a per-file media queue plus one-click rebuild of the media library, content, options, users and comments on the backup), email alerts about replication events through your own SMTP server, and a screen to browse, search and export the activity history this plugin records.

= Privacy / external services =

Continuity is self-contained. It does **not** use any external service and does not phone home. The only outbound requests it makes are to the backup site **you** pair it with, over a signed, token-authenticated REST call between your own two sites. Pairing tokens are stored only in each site's own options table.

One source ↔ one backup per install, by design.

== Installation ==

1. Install and activate the plugin on **both** sites — your live site and the site you want to use as the backup.
2. On the live site open **Kuvarssoft Continuity → Pair** and click **Generate source token**.
3. On the backup site open **Kuvarssoft Continuity → Pair**, paste the live site's address and the token under "This site is the BACKUP", and click **Pair**.
4. That's it — replication starts immediately. The dashboard's Live transfer panel animates once traffic begins.

== Frequently Asked Questions ==

= Is replication two-way? =

No. Replication is strictly source → backup. The backup only receives, so it can never overwrite your live site.

= Does it send my data anywhere? =

No. There is no external service and nothing phones home. The plugin only talks to the backup site you pair it with — that is your own site.

= What happens while the source is offline? =

Pushes that fail are recorded, and the dashboard shows your success rate, the error count for the last 24 hours and the most recent error. The backup keeps the last successfully replicated state, and replication picks up again with the next change once the source is back.

= Something was deleted on the backup by mistake. Can I get it back? =

Real-time replication only moves forward — it does not rebuild the past. The separate Kuvarssoft Continuity Pro plugin includes on-demand resync, which rebuilds the media library (files and Media Library records together), content, options, users and comments on the backup in one click.

= Are there any limits? =

No. There are no caps, quotas, throttles or time limits — every change always replicates, at full speed, at any file size.

= Can I run multiple backups for one source? =

Each source has exactly one backup peer by design — a single source ↔ one backup link.

= Where are the tokens stored? =

Only in the wp_options table of the two sites. They never leave WordPress and are never sent to a third party.

= Where does the backup site write the mirrored files? =

Into its own uploads directory (resolved at runtime with wp_upload_dir(), never a hard-coded path) — by design, at the same relative paths as the source, so every mirrored attachment URL works if the backup ever has to serve traffic. This is the plugin's core replication purpose, comparable to how backup and migration plugins restore files. Every write is protected three ways: the request must carry the pairing token (hash_equals-verified), the path is normalised and rejected on any traversal segment, and server-executable file types (php, phtml, phar, cgi and the like) plus reserved names (.htaccess, web.config) are refused outright — WordPress never allows those in a media library, so a legitimate source never sends them.

== Screenshots ==

1. Dashboard — live transfer panel, counters and success rate.
2. Pair — generate the source token and link the backup.
3. Help — pairing walkthrough and FAQ.

== Changelog ==

= 1.0.0 =
* Initial release.
