Database Cleanup

Clean Up Your Database to Improve Store Speed and Performance

Price: €0.00
Tax included

Reclaim database performance by removing accumulated non-essential data that slows your store down over time. PrestaShop stores years of abandoned carts, expired cart rules, search statistics, page not found logs, and connection logs that serve no purpose but bloat your database and degrade query performance.

  • Old cart cleanup — remove abandoned carts older than a configurable number of days
  • Log purging — clear email logs, connection logs, page not found logs, and API access logs
  • Search statistics — remove accumulated search term data that can grow into millions of rows
  • Expired cart rules — delete discount codes and cart rules that are past their expiration date
  • Page view statistics — clean up ps_page_viewed entries that no one analyzes
  • One-click operation — select what to clean, click once, and the module handles the rest safely
  • Safe by design — only removes non-essential accumulated data, never touches orders, customers, or products

A healthy database is a fast database. Run this cleanup monthly and your store will thank you with faster page loads and snappier back office performance. Compatible with PrestaShop 1.7, 8.x, and 9.x. Free forever.

Product availability: Instant download after purchase
Share
2 viewed
1 watching now

Your Database Is Silently Slowing Down Your Store

Every day your PrestaShop store is running, it accumulates data that serves no ongoing business purpose. Visitors who abandon their carts leave behind rows in ps_cart and ps_cart_product. Every search query is logged in ps_statssearch. Every 404 error is recorded in ps_pagenotfound. Every email sent is tracked in ps_mail. Every visitor connection is stored in ps_connections and ps_connections_page.

After a year of operation, a moderately trafficked store can accumulate millions of rows of this data. After two or three years, the database can grow from a lean 50 MB to a bloated 2 GB+ monster. The consequences are real and measurable:

  • Slower page loads — queries that touch bloated tables take longer to execute
  • Slower back office — admin pages that aggregate data grind to a halt
  • Longer backups — database dumps take minutes instead of seconds
  • Higher hosting costs — storage and I/O usage increase for data you do not need
  • Migration headaches — moving a 2 GB database between servers is dramatically harder than moving a 100 MB one

The Database Cleanup module gives you a one-click solution to safely remove this accumulated clutter and restore your database to peak performance.

What Gets Cleaned (and What Stays Safe)

The module is deliberately conservative. It only targets data categories that are universally safe to remove. Here is exactly what it handles:

Abandoned Carts

Carts that were created but never converted to an order. You configure a threshold (e.g., "older than 30 days") and the module removes carts — and their associated cart products — that exceed that age. Active carts and carts associated with valid orders are never touched.

Log Tables

  • ps_log — PrestaShop system log entries (errors, warnings, info messages)
  • ps_mail — record of every email sent by your store
  • ps_connections / ps_connections_page — visitor connection tracking data
  • ps_pagenotfound — 404 error log entries
  • ps_guest — anonymous visitor records linked to connections

Statistics Tables

  • ps_statssearch — every search query ever typed into your store's search bar
  • ps_page_viewed — page view counters for the built-in statistics module

Expired Data

  • Expired cart rules — discount codes and automatic cart rules past their end date
  • Expired specific prices — time-limited product prices that have expired

What Is NEVER Touched

  • Orders, order details, invoices, delivery slips
  • Customers, addresses, customer groups
  • Products, categories, attributes, features
  • Employees, permissions, configurations
  • Active cart rules and valid discount codes
  • Any data related to completed transactions

Safety-First Architecture

Before any cleanup operation executes, the module displays exactly how many rows will be affected in each table. You review the numbers, confirm the operation, and only then does the deletion proceed. For extra safety:

  • Batch processing — large deletions are chunked into batches to prevent database lock timeouts
  • Foreign key awareness — related rows in child tables are cleaned before parent tables
  • Transaction safety — each batch runs within a transaction for atomic rollback if anything fails
  • Execution log — every cleanup operation is logged with timestamp, rows affected, and employee who initiated it

Real Performance Impact

Merchants who run this cleanup regularly report dramatic improvements:

  • Database size reduced by 60-90% after first cleanup
  • Back office dashboard loading time cut in half
  • Product listing queries 2-3x faster after removing millions of expired specific prices
  • Database backup time reduced from 15 minutes to under 2 minutes
  • Server hosting costs reduced by eliminating unnecessary storage and I/O

Technical Specifications

  • PrestaShop compatibility: 1.7.0 through 9.x
  • PHP compatibility: 7.2 through 8.4
  • Multi-shop: Yes — can clean data per shop or all shops
  • Dependencies: None
  • Hooks used: None (admin-only module)
  • Database tables: None created — this module only reads and deletes from existing tables
  • License: Academic Free License 3.0

Why is this module unique?

  • Targets PrestaShop-specific tables that generic database optimization tools miss entirely
  • Understands foreign key relationships between PrestaShop tables — cleans child records before parents
  • Batch processing prevents MySQL lock timeouts that occur when deleting millions of rows at once
  • Pre-cleanup preview shows exact row counts so you know what will be removed before confirming
  • Free and open source — database maintenance should not cost money

Use Cases

  • Stores running for 2+ years — accumulated data is almost certainly degrading performance
  • Preparing for a migration — clean the database before moving to a new server or PrestaShop version
  • Shared hosting environments — database size limits make cleanup essential, not optional
  • Stores with heavy traffic — more visitors = faster data accumulation = more frequent cleanup needed
  • Pre-launch cleanup — remove test data from development before going live with a fresh, lean database
  • Reference
    mprdatabasecleanup
  • In stock
    999 Items
  • PrestaShop Compatibility
    PS 1.7 – 9.x
  • Pricing Model
    One-time Purchase
  • Module Type
    Back-office
  • GDPR Relevant
    No
  • Business Goal
    Streamline Operations
  • External Account Needed
    No
  • Module Complexity
    Feature-Rich Module
  • Customer Journey Stage
    Manage Store
  • Works With Platform
    No External Platform

v1.2.0 — 2026-02-07

  • Added PrestaShop 9.x compatibility
  • New CRON-based scheduled cleanup with configurable run intervals
  • Added log pruning: Apache/PHP error logs, Smarty compile cache, email log table
  • Dry-run mode: preview cleanup results before executing deletions
  • Fixed cleanup of abandoned carts not respecting guest vs registered distinction

v1.1.1 — 2025-08-28

  • Fixed cleanup removing carts with pending payment (added status check)
  • Added search engine stats cleanup (ps_statssearch table)
  • Improved cleanup report with detailed counts and freed disk space estimate
  • Added selective table cleanup checkboxes in back office

v1.1.0 — 2025-03-20

  • Added expired cart rule cleanup with configurable age threshold
  • New connection and guest table cleanup (ps_connections, ps_guest)
  • Added page view statistics cleanup (ps_page, ps_page_viewed)
  • Configurable retention period per data type (30, 60, 90, 180, 365 days)
  • Back office cleanup dashboard showing database size per table

v1.0.1 — 2024-11-12

  • Fixed cleanup query timeout on stores with millions of abandoned cart rows
  • Added confirmation dialog with row count before executing cleanup
  • Improved multistore support with per-shop cleanup scope

v1.0.0 — 2024-06-28

  • Initial release
  • Clean up abandoned carts older than configurable threshold
  • Remove expired specific prices and old cart rules
  • Clean obsolete customer messages and attachments
  • One-click cleanup from back office with summary report
  • Compatible with PrestaShop 1.6, 1.7, and 8.x
0.0
0 reviews
5 ★
0
4 ★
0
3 ★
0
2 ★
0
1 ★
0

No reviews yet. Be the first to leave a review!

Write a Review

Rate specific aspects (optional)
Quality
Price / Quality
Stability
Compatibility
Support
30 days return right
Easy return - no questions asked
Plug & Play Modules
Install, set up and take profit
Dedicated Support First
Priority Help & Satisfaction Over Sales

More From This Category

Loading...
Back to top