Database Cleanup & Optimizer.

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.

Availability

Available in the official Shopware Store - with auto-update notifications in the admin.

Availability

Through the store or directly from us.

Two routes, the same feature set - pick whichever suits your setup.

Directly from Stone & Water

Available right now

Monthly4,99 €
Half-yearly24,99 €17 % cheaper
Best valueYearly44,99 €25 % cheaper

All prices net, plus VAT.

You buy the licence directly from us and get an invoice from us. Install by upload in the admin without SSH, updates through our licensing platform, support straight from the developer.

Ask us directly +49 2555 9997342

Shopware Store

In preparation

The plugin will be listed in the official Shopware Community Store. Installation and automatic updates then run through the plugin manager, billing through your Shopware account. We will link it here as soon as it is live.