=== ZeroState === Contributors: mdashar Tags: reset, wordpress reset, site reset, clean wordpress Requires at least: 5.0 Tested up to: 6.8 Stable tag: 1.0.2 Requires PHP: 7.2 License: GPLv2 or later License URI: https://www.gnu.org/licenses/gpl-2.0.html Text Domain: zerostate Reset your WordPress site to a clean, default state or perform targeted resets with a modern, user-friendly interface. ๐Ÿงน ZeroState helps you get back to a blank slate, fast. == Description == **ZeroState** is a secure plugin that lets admins reset or selectively reset their WordPress site to a fresh "zero state." ๐Ÿš€ ### Key Features - **Full Site Reset** ๐Ÿ—‘๏ธ: Completely reset your WordPress site. This deletes all posts, pages, comments, media (database entries and files in uploads), plugins (except ZeroState itself), themes (except the default WordPress theme), and custom database tables. Your current admin account, core WordPress files, `wp-config.php`, `.htaccess` (can be optionally deleted via tools), the default theme, and the ZeroState plugin are preserved. - **Partial Reset Tools** ๐Ÿ”ง: - **Delete Transients**: Removes all transient database entries (temporary cache). ๐Ÿ•’ - **Reset Theme Options**: Resets theme customizations made via the Customizer (theme mods). ๐ŸŽจ - **Delete Inactive Themes**: Deletes all themes except the currently active theme (which will be the default after a full reset or if manually set) and any parent themes if a child theme is active. ๐Ÿ–ผ๏ธ - **Delete Inactive Plugins**: Deactivates and deletes all plugins except ZeroState and other active plugins. ๐Ÿ”Œ - **Clean Uploads Folder**: Deletes all files and folders inside the `/wp-content/uploads/` directory. ๐Ÿ“ - **Empty Custom Tables**: Empties (TRUNCATE) all custom database tables that are not part of the WordPress core. ๐Ÿ—„๏ธ - **Delete Custom Tables**: Deletes (DROP) all custom database tables that are not part of the WordPress core. ๐Ÿ—„๏ธ - **Delete .htaccess File**: Deletes the main `.htaccess` file from the WordPress root directory. WordPress typically regenerates this. ๐Ÿ“œ - **Modern UI** ๐ŸŒŸ: A responsive, dark/light mode interface built with Tailwind CSS, ensuring an intuitive user experience. - **Security First** ๐Ÿ”’: Includes nonce verification for all actions, capability checks (`manage_options`), and data sanitization to ensure safe operations. - **Backup Warnings & Confirmations** โš ๏ธ: Clear warnings and confirmation steps (like a confirmation slider) before performing destructive actions. - **Internationalization** ๐ŸŒ: Fully translatable. WordPress.org will handle translations based on the text domain. **WARNING** โš ๏ธ: Reset actions are irreversible. Always back up your site (database and files) before using this plugin. == Installation == 1. **Download and Install** ๐Ÿ“ฅ: * Upload the `zerostate` folder (the unzipped plugin folder) to the `/wp-content/plugins/` directory via FTP. * OR, go to 'Plugins > Add New' in your WordPress admin, click 'Upload Plugin', and upload the `zerostate.zip` file. 2. **Activate** โœ…: * Activate the plugin through the 'Plugins' screen in WordPress. 3. **Access Reset Tools** ๐Ÿ› ๏ธ: * Navigate to **Tools > ZeroState Reset** in the WordPress admin menu. 4. **Backup First!** ๐Ÿ’พ: * **CRITICAL STEP:** Before performing any reset, create a complete backup of your WordPress database and all files. Use a reliable backup plugin or your hosting provider's backup tools. 5. **Use the Tools** ๐ŸŽฏ: * Choose between a **Full Site Reset** or use the **Partial Reset Tools** to clean specific components. Read all warnings carefully. == Frequently Asked Questions == = What does the Full Site Reset do? โ“ = The Full Site Reset deletes all site content (posts, pages, comments), media library entries and files, custom database tables, and deactivates/deletes plugins and themes. It aims to return your site to a state similar to a fresh WordPress installation but **preserves**: * Your current administrator account (login, password, email). * Core WordPress files and directories. * Your `wp-config.php` file. * The default WordPress theme (e.g., Twenty Twenty-Four). * The ZeroState plugin itself. * The `.htaccess` file (unless specifically deleted using the partial tool). = Is the reset reversible? ๐Ÿšซ = No, all reset actions performed by ZeroState are **irreversible**. There is no undo button. This is why backing up your site *before* using the plugin is extremely important. = What are transients, and is it safe to delete them? ๐Ÿ•’ = Transients are a form of temporary data storage (caching) used by WordPress and plugins. Deleting them is generally safe and can sometimes resolve issues caused by outdated cached data. WordPress and plugins will regenerate them as needed. = Can I reset only specific parts of my site? ๐Ÿ”ง = Yes, the Partial Reset Tools are designed for this. You can target specific components like inactive themes, inactive plugins, the uploads folder, theme options, transients, custom database tables, or the `.htaccess` file without affecting the entire site. = Does the plugin support translations? ๐ŸŒ = Yes, ZeroState is translation-ready. The text domain is `zerostate` and the `Domain Path` is `/languages`. Translations can be contributed via translate.wordpress.org once the plugin is on the repository. = What happens to my admin account during a Full Site Reset? ๐Ÿ‘ค = Your current administrator account (the one performing the reset) is preserved. You will remain logged in, and your username, password, and email will not be changed. = Is the plugin secure? ๐Ÿ”’ = ZeroState is built with security in mind. All actions are protected by WordPress nonces (security tokens) and capability checks (only users who can `manage_options`, typically administrators, can use the plugin). Input data is sanitized. = Which files and folders are deleted during a Full Site Reset? = * **Database:** All core WordPress content tables are dropped and recreated (posts, terms, comments, etc.). Custom tables are dropped. Options are reset to default, with some key site settings (like site URL, admin user) preserved. * **Files:** * Contents of `/wp-content/uploads/` are deleted. * Themes in `/wp-content/themes/` (except the default WP theme) are deleted. * Plugins in `/wp-content/plugins/` (except ZeroState itself) are deleted. * Other files and folders in `/wp-content/` that are not part of a standard WP install or protected directories might be removed. * Files in the WordPress root directory that are not part of a standard WP install might be removed. * **Protected:** `wp-config.php`, `.htaccess` (by default), `wp-admin/`, `wp-includes/`, core WP files, the ZeroState plugin folder, and the default theme folder. == Screenshots == 1. **ZeroState Dashboard**: The modern, responsive interface in light mode, showing Full Site Reset and Partial Reset Tools. 2. **ZeroState Dark Mode**: The dashboard in dark mode, offering a comfortable viewing experience. 3. **Confirmation Slider**: Example of the confirmation slider for the Full Site Reset, enhancing safety. *(You'll need to generate these screenshots from your plugin's UI)* == Changelog == = 1.0.2 = *Minor changes. = 1.0.1 = * Plugin renamed to "ZeroState". Slug changed to `zerostate`. * Addressed all feedback from the WordPress plugin review team. * Minor UI and styling improvements. = 1.0.0 = * Initial release (as ResetWP). * Added Full Site Reset functionality. * Added Partial Reset Tools for transients, themes, plugins, uploads, custom tables, and `.htaccess`. * Implemented modern UI with dark/light mode support using Tailwind CSS. * Included security features like nonce verification and capability checks. == Upgrade Notice == = 1.0.2 = *Minor changes. = 1.0.1 = This version includes a name change to ZeroState and addresses feedback from the WordPress plugin review team, including security and best practice enhancements. Please ensure you have a full backup before updating if you were using a pre-release version. = 1.0.0 = Initial release. Always back up your site before using the plugin. **Note** โš ๏ธ: This plugin performs destructive actions. Use with extreme caution and **always back up your entire site (files and database) before performing any reset operation.** The plugin author is not responsible for any data loss.