Do WordPress Post Revisions Slow My Database?

Why Revisions Exist

Revisions provide a genuinely useful safety net, letting an editor restore an earlier version of content if a recent edit was a mistake, or simply review how content evolved over time. The tradeoff is that WordPress core doesn't limit revision count by default, so a frequently edited post accumulates a new full copy with every single save, which adds up meaningfully on a site with years of active editing.

When This Becomes a Real Issue

  • A long-running site with content edited frequently over years can accumulate a genuinely large number of revision rows, adding real, measurable bloat to the database.
  • A newer or infrequently edited site generally has much less to worry about here, since revision count scales with editing frequency and time, not simply content volume.
  • Database bloat from revisions can slightly slow certain queries and definitely increases backup size and time, even if it rarely causes dramatic, obvious performance problems on its own.
  • Autosave drafts (WordPress's periodic automatic save while editing) also contribute to this accumulation, separate from manually triggered saves.

Managing Revisions

  1. Set a revision limit via the WP_POST_REVISIONS constant in wp-config.php, capping how many revisions are kept per post going forward.
  2. Clean up existing excess revisions using a dedicated database cleanup plugin, carefully, on an established site with a long history.
  3. Take a full backup before any bulk revision cleanup, since it's a database-modifying operation.

Measuring before cleaning

  1. Count the revisions. In the database, count rows in the posts table where the post type is revision, or use WP-CLI: wp post list --post_type=revision --format=count. Compare that with the number of real posts and pages.
  2. Check the database size. Site Health → Info shows the database size, and phpMyAdmin shows the size of each table. The posts table is where revisions live.
  3. Pick a limit. A cap of five to ten revisions keeps a useful undo history without unlimited growth. Setting WP_POST_REVISIONS to false turns revisions off, which isn't wise on a site where several people edit.

Cleaning safely

Take a full backup first, because deleting revisions is permanent. On a large site, run the cleanup in batches rather than all at once, then optimise the tables afterwards. WP-CLI can delete revisions in bulk, and database-cleanup plugins offer the same with a confirmation step. Check a few posts afterwards to confirm nothing you expected to keep was affected.

Need database cleanup and optimization done safely? See WordPress speed optimization.

Available for new projects

NEXT STEP

Rather have it fixed than keep reading?

Based in Dhaka, Bangladesh — serving clients worldwide. Tell me what's happening and you'll have a reply within one working day.

  • Reply within one working day
  • Fixed quote before work starts
  • UK, EU and US hours covered