Title: Factory Reset
Author: Ankit Rawat
Published: <strong>2025 年 1 月 30 日</strong>
Last modified: 2025 年 1 月 31 日

---

搜索插件

**该插件尚未通过WordPress的最新3个主要版本进行测试**。 当与较新版本的WordPress一起
使用时，可能不再受到维护或支持，并且可能会存在兼容性问题。

![](https://ps.w.org/factory-reset/assets/icon-256x256.png?rev=3231717)

# Factory Reset

 作者：[Ankit Rawat](https://profiles.wordpress.org/ankitrawat/)

[下载](https://downloads.wordpress.org/plugin/factory-reset.1.3.zip)

 * [详情](https://cn.wordpress.org/plugins/factory-reset/#description)
 * [评价](https://cn.wordpress.org/plugins/factory-reset/#reviews)
 *  [安装](https://cn.wordpress.org/plugins/factory-reset/#installation)
 * [开发进展](https://cn.wordpress.org/plugins/factory-reset/#developers)

 [支持](https://wordpress.org/support/plugin/factory-reset/)

## 描述

The **Factory Reset** plugin allows you to reset your WordPress site to its default
state with a single click. It is designed for developers, testers, or anyone who
needs to quickly clean up a WordPress installation.

**Warning:** This plugin is extremely powerful and should be used with caution. 
It will delete all posts, pages, media, plugins, themes, custom files, and database
tables (except for the current user and basic WordPress settings). The `themes` 
folder will be preserved but emptied.

### Features

 * Delete all posts, pages, custom post types, and associated metadata.
 * Remove all comments and media files.
 * Delete all users except the current admin.
 * Reset WordPress options to default values.
 * Drop all custom database tables with the `wp_` prefix.
 * Delete all files in `wp-content/uploads` and custom folders.
 * Remove all plugins except this one.
 * Empty the `themes` folder while preserving its structure.
 * Easy-to-use admin interface with a confirmation prompt.

### License

This plugin is licensed under the GNU General Public License v2 or later.

### Author

Developed by [Ankit Rawat](https://ankitrawat.com).

### Plugin URI

For more information, visit the [plugin page](https://ankitrawat.com/factory-reset-plugin/).

## 安装

 1. Upload the `factory-reset` folder to the `/wp-content/plugins/` directory.
 2. Activate the plugin through the **Plugins** menu in WordPress.
 3. Go to **Tools > Factory Reset** in the WordPress admin dashboard.
 4. Click the **Reset Site** button to reset your site to its default state.

## 常见问题

### Q: Is this plugin safe to use?

A: This plugin is designed for developers and advanced users. It permanently deletes
data, so use it with caution. Always back up your site before using it.

### Q: What happens to the current user?

A: The current admin user is preserved, and all other users are deleted.

### Q: Does this plugin delete the `themes` folder?

A: No, the `themes` folder is preserved but emptied. This ensures the directory 
structure remains intact.

### Q: Can I recover data after using this plugin?

A: No, this plugin permanently deletes data. Ensure you have a backup before proceeding.

### Q: Does this plugin work on multisite installations?

A: No, this plugin is designed for single-site installations only.

## 评价

![](https://secure.gravatar.com/avatar/3fdba3c5f4d40f64dce20f10811d23cc6b4c771f97ea42d64ca878654161141c?
s=60&d=retro&r=g)

### 󠀁[Works as it says](https://wordpress.org/support/topic/works-as-it-says-19/)󠁿

 [Vatika](https://profiles.wordpress.org/vatikaretreat/) 2025 年 2 月 14 日

simple plugin to factory reset your installation. Works smoothly!

 [ 阅读所有1条评价 ](https://wordpress.org/support/plugin/factory-reset/reviews/)

## 贡献者及开发者

「Factory Reset」是开源软件。 以下人员对此插件做出了贡献。

贡献者

 *   [ Ankit Rawat ](https://profiles.wordpress.org/ankitrawat/)

[帮助将「Factory Reset」翻译成简体中文。](https://translate.wordpress.org/projects/wp-plugins/factory-reset)

### 对开发感兴趣吗?

您可以[浏览代码](https://plugins.trac.wordpress.org/browser/factory-reset/)，查看
[SVN仓库](https://plugins.svn.wordpress.org/factory-reset/)，或通过[RSS](https://plugins.trac.wordpress.org/log/factory-reset/?limit=100&mode=stop_on_copy&format=rss)
订阅[开发日志](https://plugins.trac.wordpress.org/log/factory-reset/)。

## 更新日志

#### 1.3

 * Preserved the empty `themes` folder after reset.
 * Improved code structure and readability.
 * Added a `$preserve_directory` parameter to the `delete_files` method.
 * Updated documentation and tested compatibility with WordPress 6.7.

#### 1.2

 * Initial release with basic reset functionality.

## 额外信息

 *  版本 **1.3**
 *  最后更新：**1 年前**
 *  活跃安装数量 **20+**
 *  WordPress 版本 ** 6.0 或更高版本 **
 *  已测试的最高版本为 **6.7.5**
 *  PHP 版本 ** 7.4 或更高版本 **
 *  语言
 * [English (US)](https://wordpress.org/plugins/factory-reset/)
 * 标签
 * [reset](https://cn.wordpress.org/plugins/tags/reset/)[site reset](https://cn.wordpress.org/plugins/tags/site-reset/)
   [wordpress-reset](https://cn.wordpress.org/plugins/tags/wordpress-reset/)
 *  [高级视图](https://cn.wordpress.org/plugins/factory-reset/advanced/)

## 评级

 5 星（最高 5 星）。

 *  [  1 条 5 星评价     ](https://wordpress.org/support/plugin/factory-reset/reviews/?filter=5)
 *  [  0 条 4 星评价     ](https://wordpress.org/support/plugin/factory-reset/reviews/?filter=4)
 *  [  0 条 3 星评价     ](https://wordpress.org/support/plugin/factory-reset/reviews/?filter=3)
 *  [  0 条 2 星评价     ](https://wordpress.org/support/plugin/factory-reset/reviews/?filter=2)
 *  [  0 条 1 星评价     ](https://wordpress.org/support/plugin/factory-reset/reviews/?filter=1)

[Your review](https://wordpress.org/support/plugin/factory-reset/reviews/#new-post)

[查看全部评论](https://wordpress.org/support/plugin/factory-reset/reviews/)

## 贡献者

 *   [ Ankit Rawat ](https://profiles.wordpress.org/ankitrawat/)

## 支持

有话要说吗？是否需要帮助？

 [查看支持论坛](https://wordpress.org/support/plugin/factory-reset/)