Factory Reset
Reset a single-site WordPress installation by removing site data and installed extensions.
The administrator account initiating the reset (identified via get_current_user_id()) is preserved so the reset returns directly to the WordPress dashboard with an active authentication session.
Processes database records in 100-item batches to prevent PHP execution timeouts and memory exhaustion on large test databases.
Requires explicit uppercase confirmation token plus nonce and manage_options capability verification before execution.
Automatic execution block on WordPress Multisite networks to prevent accidental database reset on shared network installations.
A clean WordPress installation in seconds, without destroying your server or core files.
Developing themes, testing plugins, importing dummy WooCommerce stores, or staging client handoffs leaves sites polluted with thousands of orphaned post records, media entries, comments, terms, and transient options.
Factory Reset restores your WordPress single-site installation back to a clean, newly installed state with a single controlled operation. Unlike crude SQL drops or wp-cli scripts that break site configurations, Factory Reset protects your administrative login credentials, core tables, active theme files, and core files on disk while resetting the content database and removing test assets.
Wipes posts, revisions, custom post types, attachments, comments, tags, categories, non-admin users, custom tables, inactive themes, other plugins, and orphaned transients. The administrator account initiating the reset is preserved, along with core WordPress database tables, active theme, and core server files.
Core Operational Features
-
✓
Admin Account Retention: The administrator account initiating the reset is preserved with credentials, password hash, and active session intact.
-
✓
Chunked SQL Batching: Deletes large datasets in 100-record batches to prevent gateway timeouts.
-
✓
Explicit Confirmation Token: Requires exact uppercase string verification before initiating deletion.
-
✓
Multisite Safety Guard: Refuses execution on multisite networks to safeguard shared installations.
-
✓
Zero Third-Party Dependencies: Pure PHP/MySQL execution running entirely within your WordPress environment.
How Factory Reset Safely Cleans Your Installation
A deliberate, four-stage lifecycle engineered to eliminate accidental data loss while ensuring complete database sanitization.
Pre-Flight Scope Inspection
Open the Tools → Factory Reset panel in wp-admin. Review what will be deleted and confirm that a recent database and file backup exists.
Type-to-Confirm Challenge
Type the exact uppercase confirmation token “RESET” into the verification input field. Validate the CSRF security nonce.
Chunked Batch Deletion
The engine iterates through posts, media, comments, and terms in 100-item batches, preventing server timeout errors.
Clean State Reset
Core database options are reset to standard WordPress defaults while strictly preserving siteurl, home, and the initiating administrator account.
Reset Scope & Preservation Boundaries
Understand exactly what Factory Reset removes from your installation and what remains safe.
- Database: Posts, pages, revisions, drafts, and trash items (
wp_posts&wp_postmeta) - Database: Custom post types (CPTs) and custom tables matching site prefix (
wp_*) - Database: Comments and comment metadata (
wp_comments&wp_commentmeta) - Database: Custom tags, categories, and taxonomy terms (
wp_terms& taxonomy tables) - Database: Non-admin users and secondary administrator accounts (
wp_users&wp_usermeta) - Database: Orphaned transients and plugin options in
wp_options - Filesystem: Uploaded media files and directories inside
wp-content/uploads/ - Filesystem: Inactive themes in
wp-content/themes/and other test plugins inwp-content/plugins/
- User State: The administrator account initiating the reset (via
get_current_user_id()) is preserved with password and active session - Database: WordPress core database tables are protected by an explicit whitelist; options reset with
siteurlandhomepreserved - Filesystem: Core WordPress files (
wp-admin,wp-includes, and root PHP files) are never touched - Filesystem: Configuration files (
wp-config.phpand.htaccess) remain untouched - Filesystem: Currently active theme and parent theme in
wp-content/themes/are preserved - Filesystem: Factory Reset plugin itself in
wp-content/plugins/factory-reset/is preserved - User Experience: The executing administrator is preserved so the reset can return directly to the WordPress dashboard
Technical Reset & Sanitization Engine
Six architectural pillars engineered for controlled database resets without server timeouts or accidental network data loss.
Administrative Account Retention
Will the administrator be locked out of the site?
The administrator account initiating the reset is preserved (via get_current_user_id()) prior to user table reset, allowing immediate continued administration without re-login or password reset emails.
- The administrator account initiating the reset is preserved through user table reset
- Maintains administrator role assignment and active auth session
- The executing administrator is preserved so the reset can return to the WordPress dashboard without email dependencies
Chunked Batch Deletion
Can large test databases cause gateway timeout errors?
Executes record deletions and metadata cleanup in 100-item batches to prevent PHP max execution timeouts and memory exhaustion.
- 100-record batch operations prevent gateway 504 timeout errors
- Handles databases with tens of thousands of mock records safely
- Deterministic step-by-step progress tracking
Type-to-Confirm & CSRF Verification
Can a reset be triggered accidentally by a single misclick?
Eliminates accidental execution by requiring users to type the exact uppercase confirmation token “RESET”, validated alongside WordPress nonces and capability checks.
- Case-sensitive “RESET” token verification input
- Strict WordPress nonce validation on all form submissions
manage_optionscapability check prevents unauthorized execution
Multisite Network Safety Guard
Is it safe to run on shared multi-site networks?
Detects WordPress Multisite network environments and immediately blocks reset operations to prevent accidental truncation on shared network databases.
- Automatic
is_multisite()environment detection - Explicit administrative notice explaining single-site constraint
- Safeguards sub-sites and network-wide user directories
Orphaned Meta & Transient Purge
Does the reset leave behind junk data in options and meta tables?
Deep cleans residual postmeta, commentmeta, usermeta, term relationships, and transient options left behind by uninstalled test plugins and imported datasets.
- Purges orphaned postmeta, termmeta, and usermeta records
- Cleans all transient cache entries from the
wp_optionstable - Removes residual custom taxonomy linkages
In-Admin Diagnostics & Safety Panel
Can you inspect database metrics prior to triggering the wipe?
Displays current database metrics, table row counts, and pre-flight recommendations under Tools → Factory Reset before any reset action is submitted.
- Live summary of posts, media items, comments, and non-admin users
- Clear pre-reset confirmation checklist
- Zero background telemetric reporting or external requests
Designed for Safe, Controlled Site Cleanup
Engineered to strict WordPress core coding standards with zero external dependencies.
Technical Specifications
Execution Safety
manage_options only
100% On-Server Privacy
PHP makes zero outbound HTTP requests, contains no telemetry, and transmits no private data or customer analytics to external servers. All queries execute locally on your WordPress host.
Frequently Asked Questions
What does Factory Reset do?
wp-content/uploads/, inactive themes, and other installed test plugins, while preserving core database tables (protected by an explicit whitelist), core system files, your active theme, and the administrator account initiating the reset.Is the reset operation reversible?
Which administrator account is preserved during a reset?
get_current_user_id()) is preserved, along with their login credentials, password hash, email, and active session. All secondary administrators, editors, and other user accounts are removed.Are WordPress core database tables or core files deleted?
siteurl and home preserved. WordPress core files (wp-admin, wp-includes, and root PHP files such as wp-config.php and .htaccess) are never touched.What happens to my active theme and uploaded media?
wp-content/themes/ so the site remains operational. Files inside wp-content/uploads/ are emptied while preserving directory permissions. Inactive themes and other installed test plugins are removed (except Factory Reset itself).