DB Cleaner.

Tidy your Shopware database on schedule — abandoned carts, old logs, orphaned orders. Dry-run, audit log, scheduled tasks.

What the plugin doesNeu

Cleans up your Shopware database.

Over time, every Shopware installation accumulates database junk: abandoned carts, expired sessions, old logs, failed orders. The plugin finds, lists and cleans them up — scheduled and safe.

Cart cleanup

Remove abandoned carts

Remove non-converted carts after a configurable time (e.g. 30 days) — usually the biggest storage drain in Shopware databases.

Log cleaner

Mail headers, notifications, cart recovery

Trim Shopware-internal logs regularly (mail headers, notifications, cart recovery data). Saves hundreds of MB from year two onwards.

Order cleanup

Cancellations, old guest orders

Delete cancelled or failed orders beyond a configurable age. Guest orders without follow-up orders optionally too — GDPR-compliant.

Session cleanup

Expired sessions

Expired sessions and sales-channel sessions that often linger after Shopware updates. Auto-vacuum for the sales_channel_api_context table.

Media foreign keys

Orphaned references

Finds and removes orphaned foreign-key references to deleted media — helpful with migration leftovers.

Custom queries

Your own cleanup rules

Define custom SQL cleanup rules per table — with WHERE clause and soft-delete detection. Built-in audit log.

Why it works

Database hygiene without risk.

Database cleanup sounds simple but is risky. Three mechanisms ensure nothing goes wrong.

Safe · traceable · scheduled

Three principles for every cleanup.

Database cleanup is delicate — wrong deletions are irreversible. The plugin works conservatively: dry-run mode first shows what would be deleted, audit log records every action with user and time, scheduled tasks run on clear rules instead of spontaneous clicks.

Dry-run

Show first, then delete

Every cleanup rule has a preview mode: shows the exact number of affected rows including samples before anything is deleted.

Audit log

Traceable

Every execution (manual or scheduled) is logged with rule, count, user and time. A must-have for GDPR audits.

Scheduled

Scheduled instead of manual

Via Shopware scheduled tasks: daily, weekly, monthly. No more forgotten manual clicks — and no more database growth.

Configuration

Fully in the Shopware admin.

All rules, thresholds and schedules maintainable through the admin UI. No CLI scripts, no direct SQL operations.

Per table

Custom rules

Every cleanup task is its own rule with target table, filter condition and age threshold. Granularly toggleable.

Age thresholds

Days, weeks, months

"Delete carts older than 30 days", "Logs older than 90 days" — own thresholds per rule, maintainable in the admin.

Batch sizes

Performance-friendly

Large cleanups run in batches (e.g. 1,000 rows per run) so neither DB locks nor memory issues occur.

Per sales channel

Optional filters

Optionally restrict cleanups to specific sales channels — e.g. clean B2C data only, leave B2B untouched.

Backup reminder

Before every run

We show a prominent reminder: backup first, then cleanup. Plus a confirmation dialog for large deletions.

Statistics

What was cleaned

Dashboard with statistics: space gained per table, cleanup history, largest tables vs. expected sizes.

Technical details

Clean Shopware integration.

Dedicated scheduled tasks, CLI command, soft-delete aware, batch processing. No DB patches, no core modifications.

Compatibility

Shopware 6.5Shopware 6.6Shopware 6.7PHP 8.2+

Scheduled tasks

Dedicated tasks for each cleanup rule, registered through the Shopware scheduled-task system. Runs with the normal scheduled_task:run worker.

CLI command

bin/console staw:db-cleaner:run [--rule=X] [--dry-run] — run all rules or individual ones manually, with dry-run option.

Performance

Batch processing with configurable size (default 1,000) and explicit transaction control — no lock-wait issues even with large tables.

Soft-delete aware

Detects Shopware entities with soft-delete and either uses UPDATE deleted_at or real DELETE, depending on configuration.

License

Available in the official Shopware Store — with license validation and auto-update notifications in the admin.

Availability & pricing

Via the Shopware Store · €9.99 / month.

The plugin is distributed through the Shopware Community Store as a subscription licence — license validation and auto-updates directly in the Shopware admin.

Coming soon to the Shopware Store

Plugin is about to be released — planned price €9.99 / month.

The plugin is distributed through the official Shopware Community Store and is currently in the Shopware approval process. Linked here once released — with license validation and auto-update notifications directly in the backend.

Shopware Store

In submission

Currently in the approval process. Planned price: €9.99 / month.

Want early notice?

Get notified on release

Send us a short message and we will notify you immediately when the plugin is released.

Request notification →

Pilot project?

Early access possible

Interested in a pilot deployment before official release? We have a few test licences available.

Request pilot →

Lean Shopware database?

Coming to the Shopware Store · €9.99 / month.

DB Cleaner cleans up your Shopware database in a scheduled, safe way — abandoned carts, old logs, orphaned orders. With dry-run, audit log and scheduled tasks.