Is Your PrestaShop Database Holding More Information Than Your Store Needs?

Every product page, customer account, and order confirmation in your PrestaShop store relies on your database, yet most of the storage space it consumes has nothing to do with actual sales. Behind the scenes, visitor connection logs, search histories, guest sessions, and abandoned carts silently accumulate every day, slowing down backups and creating unnecessary GDPR compliance risks.

Learning to separate essential commerce tables from disposable operational logs turns database maintenance from a high-risk chore into safe, routine housekeeping. By auditing table sizes, pruning old logs in date-bounded batches, and establishing a simple quarterly cleanup rhythm, you keep your back office responsive and your store data lean.

What A PrestaShop Database Actually Stores, Mapped By Table

Every product page, order confirmation and customer account on your store depends on data sitting in a PrestaShop database.

A PrestaShop database stores your catalogue, orders, customers and configuration, but also connection logs, statistics, abandoned carts and guest sessions. These non-essential tables typically account for most of the bloat. Clearing old log, statistics and guest data is safe once identical rows are exported and backups exist.

Once you can tell the essential tables from the ones that quietly grow every day, a PrestaShop database cleanup stops feeling risky and starts looking like routine housekeeping.

If the audit feels beyond what you want to do yourself, hire PrestaShop Developers from FME Modules who have over a decade of experience.

The Essential Tables: Your Shop's Backbone

These hold the data your storefront and back office cannot function without. A row deleted here is a product, an order or a customer gone for good.

  • ps_product and ps_product_lang: the catalogue itself, including names, descriptions and per-language values.
  • ps_orders and related order detail tables: every transaction, invoice and status change.
  • ps_customer and ps_address: registered accounts and their delivery and billing details.
  • ps_configuration: module settings, shop preferences and the values your back office reads on every page load.

The Bloat Tables: Where The Weight Hides

These tables fill up with rows nobody reads after a few weeks. They rarely break a page, but they swell backups, slow exports, and make the database harder to audit.

Table (Common Names) What It Collects Audit Priority
ps_connections, ps_connections_page Visitor connection logs and page views High, this is the classic accumulator
Statistics Tables Aggregated traffic and sales figures for dashboards Medium, old periods rarely get re-read
ps_cart and Abandoned cart rows Carts that were never converted into orders High, one of the fastest-growing areas
Guest and Session Data Identifiers for visitors who never registered Medium, tie it to your retention policy

Store owners regularly raise the connection tables as a pain point: one thread on the PrestaShop forum describes just those two tables holding 13 megabytes on a single store. On a busy shop, they are the first place to look.

The tables that grow fastest are the ones no customer ever sees. That is why the essential and non-essential split matters more than the total size number.

How Do I Check The Size of My PrestaShop Database?

You cannot fix what you have not measured. The real audit question is which tables are growing, and whether that growth matches how you actually sell. On a busy store, run these checks on a staging copy so a heavy query does not slow checkout for live customers.

  1. Open phpMyAdmin and select your shop's database. The table list shows each table's size, and sorting by size immediately exposes the heavy hitters.
  2. Run SHOW TABLE STATUS from the SQL tab. It returns row counts, data length and index length per table, a cleaner basis for comparison than eyeballing the list.
  3. Check Advanced Parameters > Information in the PrestaShop back office. This panel gives you the database size and the PrestaShop version at a glance, useful for a quick before-and-after.
  4. Count Rows Per Table with a simple SELECT COUNT(*) on the tables you suspect, such as connection and statistics tables. A user on the PrestaShop forum reported ps_connections and ps_connections_page taking up 13 megabytes of storage, which shows how quickly logging tables can outgrow the catalogue itself.

There is no universal "healthy" size, because a large multi-language catalogue is a different animal from a small store. The meaningful baseline is a ratio: product, order and customer tables should account for most of the footprint, while logs, stats and carts stay modest.

Record those numbers with the date. That snapshot makes the next quarterly audit a five-minute job instead of a forensic investigation, and it is the first deliverable your developer needs if you hand the cleanup over.

The Hidden Culprits: Connection Logs, Stats, Guest Sessions, & Abandoned Carts

PrestaShop writes to its database constantly, and most of that writing has nothing to do with orders or customers. Every page view, every search, every visitor who never logs in and every cart that never converts leaves a row behind. None of these tables are broken; they simply never stop growing, and they grow fastest on stores with plenty of traffic but modest sales.

The accumulators worth knowing by name:

  • ps_connections and ps_connections_page record visitors and the pages they land on. They are the usual suspects in "why is my database so large" threads, with merchants reporting these two tables consuming 13 megabytes of storage on a single store in the PrestaShop community forum. On a busy catalogue, that figure scales with traffic, not with revenue.
  • ps_guest logs the guest checkout record for anyone who starts an order without an account. A shopper who fills a cart, reaches the carrier step and leaves leaves a guest row behind that never becomes a customer.
  • ps_statssearch stores every internal search, including the typos, the one-letter queries and the repeated product names typed by the same visitor.
  • ps_statsdate is the daily statistics roll-up the dashboard reads from. It is small per row and steady per day, which is why nobody notices it until a few years have passed.

Add an abandoned cart table that keeps every unfinished cart, and the pattern becomes clear: a warehouse that restocks the storeroom faster than it sells.

Worse, from a compliance view, connection and guest tables describe identifiable visitors, their IP addresses and their browsing, so stale rows are not just weight you are carrying; they are personal data you are storing longer than you need to.

These tables also outgrow the data your store depends on for a simple reason: they have no natural ceiling. Products stop being added eventually. 

How To Clean Up Unused Data in PrestaShop Step By Step

Deleting database rows is irreversible, so the order of operations matters more than the speed. Work through these stages in sequence and test the storefront at the end, not the beginning. The PrestaShop Database Optimization module (under Advanced Parameters) handles routine cleanup, but it will not back up for you.

  1. Back Up The Whole Database First. Export a full dump from your hosting control panel (phpMyAdmin or your panel's database tool) and download it. Keep a second copy off the server. Without this, one wrong WHERE clause can wipe live order data.
  2. Export The Rows You Plan To Delete. Run a SELECT with the same conditions you will use in the DELETE, then export those results to a file. If a customer disputes an old cart or you need a connection record for an audit, you still have it.
  3. Delete in Small Batches. Use targeted DELETE statements with a date filter (for example, records older than twelve months) rather than removing everything at once. Batch by month so you can spot a mistake before it compounds.
  4. Truncate Old Statistics. Statistics tables such as page-view and visitor data grow continuously and rarely need years of history. Clear entries beyond the window you actually report on.
  5. Empty The Log Tables. PrestaShop writes logs for errors, emails and campaigns into dedicated tables. These are safe to clear once you have reviewed any recent errors you care about.
  6. Optimise The Tables. After large deletions, run an OPTIMIZE TABLE (or phpMyAdmin's Optimize action) so the database file reclaims the freed space rather than keeping it reserved.
  7. Verify The Storefront & Admin. Load the homepage, a product page, the cart and checkout, and open the Modules and Advanced Parameters pages. Confirm orders and customer accounts still display correctly.

A cleanup is only finished when the storefront, checkout and admin all load normally after it. If anything breaks, restore the backup and inspect which tables the DELETE touched before retrying.

PrestaShop Database Cleanup vs Keeping Old Data: The Rights and Performance Trade-off

Every cleanup decision comes down to one question: is this row something you are obliged to keep, something you might want later, or something you never got round to deleting?

Start with data protection rules such as the UK GDPR. Under the right to erasure, customers can ask you to delete their personal data, and "we kept it in a log table" is not a defence.

Guest sessions, connection records and abandoned cart rows routinely hold email addresses, IP addresses and browsing trails. Pruning those on a schedule is compliance work, not just housekeeping.

Against that sits history you genuinely need. Order and invoice records support accounting, tax and warranty claims, so never casually truncate the orders tables: delete a single row, and you break a customer's order history, not just a statistic.

  • Prune Freely: Guest carts that never converted, connection and page-view logs, and old stats snapshots.
  • Keep with A Retention Window: Customer accounts, newsletter consent records and support messages.
  • Keep Indefinitely: Orders, invoices, order detail and any table your accounting rules require.

On performance, trimming bloated log tables makes backups faster, exports quicker and admin pages snappier. If your hosting runs on the minimum configuration PrestaShop recommends, including a server memory allocation sized for your store, a smaller database leaves more room to work.

Where Does WooCommerce or Shopify Differ On Data Retention?

PrestaShop keeps its data on your server, in tables you can see and query. That is why a PrestaShop database cleanup is even possible: nothing is hidden behind a vendor dashboard. Hosted and template-driven platforms work differently, and the difference matters if you are weighing a migration.

On WooCommerce, bloat collects much as it does in PrestaShop, through post revisions, transients, orphaned meta and old order notes. The cleanup advice for that stack is to purge revisions and limit how many are stored per post, as this page speed and conversion analysis recommends. The principle is identical: the store owns the mess.

Shopify sits at the other end. You never touch a database; retention is handled by the platform, and historical order and analytics data is governed by Shopify's own terms rather than your housekeeping. You trade control for a smaller admin burden, and you cannot audit the raw rows the way you can in phpMyAdmin.

  • PrestaShop: Full visibility and full responsibility; logs such as connections and stats live in your own tables until you clear them.
  • WooCommerce: Self-hosted like PrestaShop, with similar log and revision build-up and similar cleanup duties.
  • Shopify: Managed retention, minimal exposure to raw data, but less control over what is stored and for how long.

If you move a large PrestaShop store to a managed platform, audit the database before exporting. 

A Quarterly Audit Checklist So The Bloat Never Returns

Cleaning a bloated PrestaShop database once fixes a symptom. A short audit every three months keeps it from creeping back. Block out an hour, run the checks in order, and log what you find so the next audit has something to compare against.

  1. Take A Full Backup First. Use your host's snapshot tool or export through phpMyAdmin before you change anything. No audit step runs until a restorable copy exists.
  2. Record The Baseline Size. Note the total database size from your hosting panel or the Tools section in the PrestaShop back office, and save it alongside the date.
  3. Set A Log Purge Cadence. Decide how long you keep connection and page logs, then schedule the cleanup so it clears old rows on that rhythm rather than piling up indefinitely.
  4. Agree on a Stats Retention Policy. Pick a window you actually review (a quarter or a year of visitor stats, for instance) and archive or drop anything older.
  5. Prune Guest Sessions. Clear guest carts and sessions past their useful life, keeping only customers who logged in or converted.
  6. Set A Size Threshold Trigger. Choose a database size that signals "audit now" and write it down. Crossing it means investigate, not panic.

Growth that looks gradual month to month can compound quietly over a year without anyone noticing. If cleaning, tuning and pruning still leave you fighting the same bloat every quarter, it can pay to bring in specialist help. 

Keep the audit notes in the same place each time. Several quarters of "before" and "after" sizes tell you far more about your store's data habits than any single cleanup will.

Why A Big PrestaShop Database Is A Business Problem

If your PrestaShop database has grown far beyond the size of your catalogue, PrestaShop database cleanup is overdue. The store is hoarding data it no longer needs, and that hoard costs you speed, backup space and, in some cases, legal exposure. This guide shows you what the extra data usually is, how to audit it properly, and how to turn that audit into a routine you repeat every quarter.

Most merchants only look at the hard drive when a host sends a warning about disk usage or a backup times out. By then the database has been collecting connection logs, statistics and abandoned cart records for years. Treat it the way you treat stock rotation: check on a schedule, act on what you find, and write down what you removed.

What Actually Makes A PrestaShop Database Grow

Database bloat in PrestaShop is rarely one dramatic cause. It accumulates quietly from a handful of sources and knowing which is which tells you whether you can delete, archive or must keep.

Connection & Visitor Logs

The ps_connections and ps_connections_page tables record visitor sessions and page views. They are useful for short-term traffic analysis and worthless after a few months. On a busy store, they are often the fastest-growing tables in the schema.

Statistics & Search Records

PrestaShop tracks statistics for its own dashboard, and ps_search_index plus search query logs grow with every customer who uses the search bar. None of it affects orders, and much of it duplicates Google Analytics or your own reporting. That is the first place a routine cleanup should look.

Abandoned Carts and Guest Data

Carts are stored the moment a visitor adds a product, logged in or not. The overwhelming majority never convert. A store that has run for years without pruning guest carts is sitting on thousands of records describing people who left and never came back.

Module & Orphaned Tables

Every module you install can create its own tables, and uninstalling a module does not always remove them. The result is a set of orphaned tables, some with data from modules you no longer use. Audit them by name and check whether any live module still writes to them.

This is where database hygiene stops being purely technical. Records that identify a person (email addresses in abandoned carts, IP addresses in connection logs) fall under data protection rules such as the UK GDPR. Storing personal data you cannot justify is a compliance liability, not just a performance problem. Keeping logs "just in case" is harder to defend than a documented retention period.

How To Run A PrestaShop Database Audit

An audit is not a one-off cleanup. It is a repeatable check that tells you what grew, what should go, and what you must keep. Do it on a copy of the store first, never on the live database during trading hours.

Step 1: Measure Before You Touch Anything

Open phpMyAdmin or your host's database panel and look at table sizes, sorted largest first. Note the top ten. That list is your baseline for next quarter's comparison.

Step 2: Classify Each Table

Put every large table into one of three buckets: core commerce data you must keep (orders, customers, products, invoices), operational data you can archive (logs, statistics, search history), and unknown tables you need to identify. Do not delete anything from the third bucket until you know what writes to it.

Step 3: Back Up, Then Prune

Take a full database export before any deletion, and confirm the export restores cleanly on a staging copy. Most of the "extra" data can be removed with a date filter: keep connection logs and search history for a defined window, then clear older records. Abandoned guest carts with no order attached can usually go on the same date rule.

Step 4: Deal with The Tables PrestaShop Itself Uses

Some growth is normal and should not be fought. Your ps_cart, ps_guest and ps_connections tables will keep filling up between audits. The goal is a ceiling, not zero. Set a size you are comfortable with and let the quarterly check catch anything that breaches it.

Step 5: Record What You Did

Keep a short log: date, tables touched, rows removed, backup file name. If a data subject asks what you hold on them, or an auditor asks about retention, that record is the difference between a documented policy and a shrug.

A Quarterly Audit Routine You Can Actually Keep

The audit only works if it repeats. Put one hour in the calendar each quarter and follow the same checks, so next time is a comparison rather than a discovery exercise.

  • Compare & Flag: Check current table sizes against last quarter's baseline and flag anything that has grown sharply.
  • Purge Logs: Clear connection and page-view logs past your retention window.
  • Archive Stats: Move or drop statistics older than the period you actually report on.
  • Prune Guest Data: Remove unused guest sessions and abandoned carts that never converted.
  • Record the Result: Save the new baseline and the date so the next audit has something to compare against.

Take Away

A PrestaShop database does not get heavy from one bad decision. It gets heavy because connection logs, search stats, guest sessions and abandoned carts add rows every day and nobody sets a ceiling. Measure the tables, sort them into keep and prune, and the job becomes routine rather than daunting.

Keep the fundamentals intact: export before you delete, prune in date-bounded batches, optimise the tables afterwards, and hold on to every order and invoice record your accounting rules require.

Frequently Asked Questions

Is It Safe To Delete Rows From ps_connections and ps_connections_page?+–
Yes, once you have taken and downloaded a full database backup and exported the rows you intend to remove. These tables log visitor sessions and page views, not orders or customer accounts. Delete in date-bounded batches, optimise the tables afterwards, then load the storefront and checkout to confirm nothing broke.
How Often Should I Run A PrestaShop Database Audit?+
Quarterly works well for most stores. Record the baseline size and the date on the first audit, then compare each quarter and flag anything that has grown sharply. A busy shop with heavy traffic may want to check log tables monthly, while a smaller catalogue can comfortably stay on the three-month cycle.
Will A Database Cleanup Speed Up My PrestaShop Store?+
It helps, but the effect is mostly indirect. A leaner database makes backups and exports faster and admin pages snappier, and it frees room on servers that run on the minimum recommended configuration. Front-end page speed depends on far more than table size, so treat the cleanup as good hygiene rather than a speed fix.