
Every time you save a draft in WordPress, the platform stores a full copy of that post. Revisions let you roll back to earlier versions, but they also accumulate in your database—sometimes hundreds per post—and slow down queries, backups, and migrations.
The reflex is to cap revisions aggressively or delete them in bulk. But the right strategy depends on your publishing cadence, team size, and how often you actually need rollback. Here’s how to decide.
What revisions store and where they cost you
Each revision is a row in wp_posts with post_type = 'revision'. It duplicates the entire post content, title, and excerpt. If you publish daily and edit a post five times before hitting publish, you create five revision rows. After a year, a single post might carry 50+ revisions.
Revisions inflate your database size, which makes:
- Full-site backups slower and larger
- Database exports during migration take longer
- Queries that scan
wp_posts(like search or archive pages) marginally slower, especially on shared hosting without query caching
The impact is nonlinear. A site with 500 posts and 10,000 revisions won’t feel it. A site with 10,000 posts and 100,000 revisions will notice backup timeouts and slower admin-panel loads.
When to cap revisions
WordPress stores unlimited revisions by default. You can cap them by adding a constant to wp-config.php:
define('WP_POST_REVISIONS', 5);
This limits future saves to five revisions per post. Existing revisions remain until you prune them.
Cap revisions if:
- You’re a solo operator who rarely needs to roll back more than a few saves
- You publish daily and edit in real time (each auto-save creates a revision)
- Your hosting plan has tight database-size limits (some shared hosts cap at 1–2 GB)
Don’t cap if:
- You run a team where multiple people edit the same post over days—rolling back to “Tuesday’s draft” is common
- You write long-form content and iterate across many sessions; ten revisions might span a week
- You’re on managed WordPress hosting that handles database optimisation automatically (many plans run scheduled cleanup)
When to audit and prune
Pruning means deleting old revisions. WordPress doesn’t do this automatically, but plugins can. The two most common are WP-Optimize and Perfmatters.
Both let you delete all revisions older than a threshold (say, 30 days) or trim each post to a maximum count. Some managed hosts (including those using the BigScoots stack) include WP-Optimize or similar tooling in their control panels.
Audit your revision count before you prune. Run this query in phpMyAdmin or your host’s SQL panel:
SELECT COUNT(*) FROM wp_posts WHERE post_type = 'revision';
If the count is under 1,000, pruning won’t move the needle. If it’s over 10,000, pruning can shrink your database by 10–30% and speed up exports.
Prune if:
- Your database export takes more than a few minutes and you’re migrating hosts
- Backups are timing out or skipping the database
- You’ve been publishing for years without ever capping revisions
Don’t prune if:
- You might need to roll back posts from months ago (rare, but some legal or editorial workflows require it)
- Your host auto-optimises—check your hosting dashboard or ask support before running a third-party cleanup plugin
What breaks when you prune
Deleting revisions is usually safe, but two edge cases cause trouble:
Autosaves. WordPress treats the most recent autosave as a special revision. If you prune all revisions while a post is open in the editor, the autosave vanishes and unsaved changes are lost. Prune when no one is editing.
Custom post types with revision dependencies. Some plugins (especially page builders and form tools) store metadata attached to revisions. Deleting the revision orphans the metadata. This is rare but can break rollback for pages built with Elementor or Beaver Builder. Test on staging first if you use a page builder heavily.
A sensible default
For most solo operators: cap revisions at 5–10 in wp-config.php, and audit once a year. If your revision count stays under a few thousand, leave it alone. If it balloons past 10,000, prune anything older than 60 days.
For teams: leave revisions uncapped, but schedule a quarterly prune of revisions older than 90 days using WP-Optimize or your host’s tooling.
Have a WordPress ops question? Subscribe to One Two Three Send and reply to any issue—we answer reader questions every Sunday.
