=== ResetForge for Multisite ===
Contributors: elevoire, hassanraza
Donate link: https://wise.com/pay/r/RD1pa-Uv5NlRSXw
Tags: multisite, reset, database, cleanup, developer-tools
Requires at least: 6.0
Tested up to: 7.1
Requires PHP: 8.1
Stable tag: 1.0.0
License: GPLv2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html

A scope-aware, safety-first, developer-focused reset and cleanup platform built specifically for WordPress Multisite networks.

== Description ==

ResetForge for Multisite is engineered from the ground up for WordPress Multisite networks. Unlike traditional single-site reset plugins that execute broad `TRUNCATE wp_*` queries, this plugin enforces strict database prefix isolation, filesystem sandboxing, and resource classification to ensure that resetting a subsite never impacts other sites, shared users, or network configuration.

= Key Features =

* **Strict Multisite Scope Isolation**: Distinguishes network tables, site-specific tables, shared user tables, and third-party plugin tables.
* **Granular Reset Profiles**:
  * *Content Reset*: Safely removes posts, pages, terms, taxonomies, and comments while preserving media, options, and plugins.
  * *Content + Media Reset*: Cleans content and site-specific uploads directory while leaving root uploads untouched.
  * *Development Reset*: Cleans content, media, transients, and plugin site tables for iterative development.
  * *Factory Reset*: Reverts a subsite to a clean initial state while preserving core routing and bootstrap options.
* **Deterministic Reset Plans & Dry-Run**: Inspect exact discovered tables, row counts, and upload sizes prior to any destructive operation.
* **Safety Snapshots**: Generates pre-operation database table dumps and JSON metadata manifests in protected storage.
* **Post-Reset Invariant Verification**: Automatically verifies network integrity, user table invariance, and target cleanup post-execution.
* **Network Audit Log**: Permanent network-level ledger of all reset operations, users, durations, and results.
* **WP-CLI Native Integration**: Identical core engine exposed via `wp resetforge {sites|scan|reset|history}`.
* **Concurrency Locking**: Prevents double-submissions, parallel execution conflicts, and race conditions.

== Installation ==

1. Upload `resetforge-for-multisite` to the `/wp-content/plugins/` directory, or install through Network Admin.
2. Network Activate the plugin through the 'Plugins' menu in WordPress Network Admin.
3. Access the toolkit under **Network Admin > ResetForge**.

== Frequently Asked Questions ==

= Does resetting a subsite delete users? =
No. In WordPress Multisite, users reside in the global `wp_users` and `wp_usermeta` tables. Resetting a subsite only removes site-specific role assignments and leaves user accounts intact across the network.

= Can I reset the Main Site? =
Yes, but the Main Site (`blog_id = 1`) receives enhanced safeguards. Shared network options and subsite uploads folders (`/uploads/sites/`) are strictly protected from deletion.

= Is WP-CLI supported? =
Yes. You can run `wp resetforge scan <site-id>` and `wp resetforge reset <site-id>` using the exact same safety engine.

== Screenshots ==

1. Network Admin Dashboard showing site selector, profiles, and dry-run scan plan.
2. Safety confirmation modal requiring typing confirmation phrase.
3. Discovered table classification matrix with protection badges.

== Changelog ==

= 1.0.0 =
* Initial production release of ResetForge for Multisite.

== Upgrade Notice ==

= 1.0.0 =
* Initial release of ResetForge for Multisite.
