NOUSK

Nousk WordPress Reset: Resetting a WordPress installation without reinstalling the system

Nousk WordPress Reset is a plugin that allows you to clean up a WordPress installation without having to reinstall the entire core system. It removes content, plugins, and extra themes, keeping only what is necessary to continue development. The goal is to simplify a common process in testing environments where frequent site resets are required.

Notice: This plugin interface and documentation are currently available only in Portuguese. English translation is planned for a future update.

What the plugin does

When a reset is executed, the plugin performs a broad cleanup of the installation.

It removes:

  • Posts, pages, and custom post types
  • Attachments and media files
  • Trashed content
  • Categories, tags, and other taxonomies
  • Comments
  • Installed plugins
  • Extra themes

The result is a clean environment, ready for new tests or development.

What is kept

The plugin preserves essential elements to ensure WordPress remains functional:

  • Users
  • The reset plugin itself
  • A default WordPress theme, if available

If no default theme is installed, the current theme is kept to prevent the site from being left without an active theme.

How it works internally

Content removal is handled using native WordPress functions, such as:

  • `wp_delete_post()`
  • `wp_delete_attachment()`
  • `wp_delete_comment()`

These functions ensure that data is removed consistently, respecting the system’s internal structure. To ensure all records are found, including items in the trash, the plugin also utilizes direct database queries. This prevents data from being left behind due to filters or standard query limitations.

About the Database

The plugin does not remove all tables or options from the database. This is an intentional architectural decision. Indiscriminately deleting internal data can break the WordPress installation or lead to inconsistent behavior by affecting core settings.

Therefore, the plugin does not perform a full database reset (drop/recreate), but rather a controlled data cleanup. Depending on the installation history, some technical data may remain and can be reviewed manually if necessary.

Plugins and Special Files

Not all plugins are automatically removed. The plugin preserves:

  • Must-use plugins (mu-plugins)
  • Drop-ins (such as `object-cache.php` and `advanced-cache.php`)

These files are often part of the hosting or server configuration and should not be removed automatically.

How this helps

The plugin eliminates the need to reinstall WordPress just to clean an environment. With it, you can:

  • Quickly restart a project.
  • Test plugins or themes in a clean environment.
  • Repeat test scenarios with consistency.
  • Avoid repetitive manual processes.

This is especially useful in development and staging environments.

About Usage

A reset is a destructive action. All removed content cannot be recovered after execution. Therefore, using the plugin requires full awareness of its impact. It is best suited for environments where data loss is not an issue.

Technical Considerations

The plugin combines two approaches:

1. Use of native WordPress functions.
2. Direct database queries.

This ensures a more thorough cleanup, reaching records that might be missed by standard functions alone. It also includes permission validation and nonces to secure the execution of the reset.

Conclusion

Nousk WordPress Reset is a tool focused on efficiency in development environments: cleaning a WordPress installation quickly and consistently. The idea is to reduce time spent on repetitive tasks and allow for more focus on actual development.

Github

⇐Back to Blog
Github LinkedIn YouTube Instagram TikTok