You're hoarding history. WordPress saves a new revision every time you click "Update" on a post. Over time, this creates hundreds or thousands of revision records bloating your database and slowing backups.

Why This Matters

Each revision is a full copy of the post content stored in wp_posts. A site with 100 posts and unlimited revisions might have:

  • 500–2,000 revision rows in the posts table
  • Associated postmeta for each revision
  • Larger database backups that take longer to create and restore
  • Slower database queries (especially on hosts with limited MySQL resources)

How to Fix It

Safe Practice: Before making any technical changes, ensure you have a full backup of your site (files and database) via your hosting control panel or a dedicated plugin like UpdraftPlus.

Step 1: Limit Future Revisions

Add this to wp-config.php, before the line /* That's all, stop editing! */:

define('WP_POST_REVISIONS', 5);

This keeps only the last 5 revisions per post. That's enough for safety without hoarding.

To disable revisions entirely (not recommended unless you have backups):

define('WP_POST_REVISIONS', false);

Step 2: Clean Existing Revisions

Using SQL (via phpMyAdmin):

DELETE FROM wp_posts WHERE post_type = 'revision';

Then optimize the table:

OPTIMIZE TABLE wp_posts;

Using a plugin:

  • WP-Optimize → Database → clean revisions
  • WP Sweep — one-click revision cleanup
  • Advanced Database Cleaner — scheduled cleanup

Step 3: Clean Associated Meta

After deleting revisions, clean orphaned postmeta:

DELETE pm FROM wp_postmeta pm
LEFT JOIN wp_posts p ON pm.post_id = p.ID
WHERE p.ID IS NULL;

What to Watch For

  • Set the revision limit BEFORE cleaning. Otherwise WordPress will immediately start creating unlimited revisions again.
  • Revisions are useful — they let you undo accidental changes. Don't set the limit to 0 unless you have another backup strategy.
  • WooCommerce products and orders also create revisions. High-traffic stores benefit significantly from limiting revisions.
  • After cleaning, your database size should drop noticeably. Run OPTIMIZE TABLE to reclaim the freed space.