Database Cleanup & Optimizer Manual.

How to clean up your Shopware database in a scheduled, safe way - with dry-run, audit log and scheduled tasks.

Installation

Up and running in minutes.

Installation and activation happen entirely in the Shopware backend - no code changes required.

1 · Requirements

Requires Shopware 6.7 / PHP 8.2+. As always, create a database backup before larger changes.

2 · From the Store

In the backend, go to Extensions › Store, search for the plugin and install it. Updates then appear automatically in the backend.

3 · Activate

Activate the plugin under Extensions › My extensions, then run bin/console cache:clear or clear the cache from the backend.

4 · Open

The module sits under Extensions › Stone & Water › Database Cleanup & Optimizer.

Cleanup areas

What gets cleaned.

You pick exactly which data is cleaned up - nothing runs without being asked.

Abandoned carts

Abandoned carts

Orphaned, abandoned carts are removed.

Old logs

Mail, notification, recovery

Mail header, notification and customer-recovery logs can be cleaned up selectively.

Orders & sessions

Cancellations, guests, sessions

Cancelled and old guest orders, expired sessions and orphaned references.

Principles

Three principles for every cleanup.

Safe, traceable and schedulable - keeping cleanup low-risk.

Show first, then delete

The dry-run shows what would be removed - you only delete after reviewing.

Audit log

Every run is logged and stays traceable.

Schedulable & retention

Scheduled tasks instead of manual work - with retention by days, weeks or months. Custom cleanup rules are possible.

CLI

Clean up from the console.

For automation and large data volumes the cleanups can also run via CLI.

Analyse

bin/console staw:order-versions:analyze shows what could be cleaned - without deleting.

Clean

bin/console staw:order-versions:clean runs the cleanup according to the configuration.

Scheduled task

In the background the cleanup runs via the scheduled-task worker at your interval.

FAQ

Common questions.

Answered briefly.

Can I delete something by accident?

The dry-run shows what is affected beforehand. Before production runs we also recommend a DB backup.

How often should I clean up?

It depends on the shop - via scheduled tasks it runs automatically at your preferred interval.

A lean database?

Back to Cleanup & Optimizer.

All features on the product page. We are happy to help with setup and cleanup strategy.