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
- Set a revision limit via the
WP_POST_REVISIONSconstant in wp-config.php, capping how many revisions are kept per post going forward. - Clean up existing excess revisions using a dedicated database cleanup plugin, carefully, on an established site with a long history.
- Take a full backup before any bulk revision cleanup, since it's a database-modifying operation.
Measuring before cleaning
- 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. - 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.
- Pick a limit. A cap of five to ten revisions keeps a useful undo history without unlimited growth. Setting
WP_POST_REVISIONStofalseturns 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.