Site Cleanup

This project is not covered by Drupal’s security advisory policy.

Summary

This module provides a safe and controlled way to clean up a Drupal site by removing unnecessary data, configuration clutter, and leftover development artifacts. It is especially useful for developers moving sites between environments or preparing a production-ready database.

Instead of manually tracking what needs to be removed, this module centralizes cleanup tasks into a single tool that can be run consistently across environments.

Features

This module adds a structured cleanup system for Drupal sites, focused on reducing noise in the database and configuration.

Key functionality includes:

* Removing or resetting development-related data such as test content or temporary configuration
* Cleaning up leftover site artifacts that accumulate during development
* Providing a single interface or command set for running cleanup tasks
* Supporting repeatable cleanup routines for dev, staging, and production workflows

You would typically use this module when:

* Moving a site from development to production
* Resetting a cloned site for testing
* Keeping staging environments clean and predictable
* Removing unwanted data after module testing or feature development

It is not meant for day-to-day content management, but rather for controlled maintenance tasks performed by developers or site builders.

Post-Installation

After enabling the module, cleanup tools are typically available through one or more of the following:

* A configuration page under the Drupal administration interface
* Drush commands for running cleanup tasks from the terminal
* A set of predefined cleanup operations exposed by the module

In most setups, no additional content types or front-end changes are created.

Setup usually involves:

* Enabling the module
* Reviewing available cleanup actions in the admin UI or via Drush
* Running a first cleanup in a non-production environment to confirm expected behavior
* Optionally configuring which cleanup operations are allowed or excluded

It is recommended to test all operations in a staging environment before running on production databases.

Additional Requirements

This project is built to work with Drupal core and standard development tooling.

Depending on how it is used, it may rely on:

* Drush (recommended for command-line execution)
* Core database and configuration APIs

No external services or third-party libraries are required for basic functionality.

The module works well alongside common Drupal development tools, such as:
- Devel (for development utilities and debugging)
- Configuration Split (for environment-based config management)
- Drush (for automation and scripting workflows)

These are optional but improve workflow control and environment management.

Similar projects

There are other Drupal modules focused on cleanup and maintenance, but they often target narrower use cases such as cache clearing, log cleanup, or database optimization.

What makes this module different is its focus on a unified cleanup workflow that is designed for developers handling full site environments rather than single maintenance tasks.

Supporting this Module

If you find this module useful, consider supporting development through GitHub sponsorship or other contribution platforms. Contributions help improve cleanup coverage, expand Drush support, and maintain compatibility with newer Drupal versions.

Community Documentation

More usage examples and setup guidance can be found in the project repository: https://github.com/nikoicarl/drupal-site-cleanup-plugin

Additional documentation and examples may be added over time, including:

* Common cleanup workflows for staging and production
* Recommended Drush commands
* Safe usage patterns for team environments

Project information

Releases