Description
Factory Reset helps developers and advanced users clean a single-site WordPress installation without reinstalling WordPress.
The reset permanently removes site content, comments, uploaded files, users other than the current administrator, installed plugins other than Factory Reset, non-core database tables, and installed themes other than the active theme and its parent theme.
The active theme is preserved so the installation is not left without a usable theme. WordPress core files, the current administrator account, core database tables, and the site’s installation URLs are preserved.
Important: This operation is permanent. Always create and verify a backup before using Factory Reset.
Features
- Delete posts, pages, custom post types, attachments, revisions, and related data through WordPress APIs.
- Delete comments.
- Delete all users except the current administrator.
- Remove non-core database tables using WordPress’s core table list as the protected set.
- Empty the configured WordPress uploads directory while preserving the directory itself.
- Remove installed plugins except Factory Reset.
- Remove installed themes except the currently active theme.
- Reset selected core site settings to clean defaults.
- Require the administrator to type
RESETbefore the operation can run. - Use WordPress nonces and capability checks for the destructive action.
- Single-site only; multisite installations are refused.
License
This plugin is licensed under the GNU General Public License v2 or later.
Author
Developed by Ankit Rawat.
Plugin URI
For more information, visit the plugin page.
Installation
- Install and activate Factory Reset from the WordPress Plugins screen.
- Go to Tools > Factory Reset.
- Read the warning and make a verified backup.
- Type
RESETin the confirmation field. - Click Reset Site.
FAQ
-
Is Factory Reset reversible?
-
No. The reset permanently deletes data. Restore a verified backup if you need to recover the site.
-
Which user is preserved?
-
The administrator account that performs the reset is preserved. Other WordPress users are deleted.
-
Are WordPress core database tables deleted?
-
No. WordPress core tables are explicitly protected. Tables outside WordPress’s core table list that use the site’s database prefix are removed.
-
Are WordPress core files deleted?
-
No. The plugin only removes files within the configured uploads directory and installed plugins/themes. WordPress core files are not touched.
-
Is the active theme deleted?
-
No. The active theme is preserved so the site remains usable after the reset. If it is a child theme, its parent theme is preserved too.
-
Does Factory Reset support multisite?
-
No. The plugin deliberately refuses to run on multisite installations.
-
Does Factory Reset send data anywhere?
-
No. The plugin does not make remote requests, collect telemetry, or send usage data.
-
Should I use this on a production site?
-
Only if you intentionally want to permanently remove the site’s data and have a verified backup. The plugin is primarily intended for development, testing, and controlled site resets.
Reviews
Contributors & Developers
“Factory Reset” is open source software. The following people have contributed to this plugin.
ContributorsTranslate “Factory Reset” into your language.
Interested in development?
Browse the code, check out the SVN repository, or subscribe to the development log by RSS.
Changelog
2.0.0
- Updated compatibility metadata for WordPress 7.0.
- Reworked destructive operations to protect WordPress core database tables.
- Added single-site enforcement.
- Added mandatory
RESETconfirmation. - Improved capability, nonce, input validation, output escaping, and redirect handling.
- Removed hard-coded
wp-contentpaths in favor of WordPress directory APIs. - Fixed plugin self-preservation for both directory and root-level installations.
- Preserved the active theme to avoid leaving the site without a usable theme.
- Improved large-site deletion by processing posts in batches.
- Removed the old custom-folder assumption and now clear the configured uploads directory.
- Added internationalization-ready text domain and translatable admin strings.
- Updated documentation for current WordPress.org plugin requirements.
1.3
- Preserved the empty themes folder after reset.
- Improved code structure and readability.
- Added a
$preserve_directoryparameter to thedelete_filesmethod. - Updated documentation and tested compatibility with WordPress 6.7.
1.2
- Initial release with basic reset functionality.