Sign inBlogSupportContact
Tools

Take control of WordPress post revisions

Your database has thousands of rows nobody will ever look at. Two commands fix that.

3 min read May 2026 limit revisions / clear revisions

Your database backup is 180 MB. It should be 90.

You download a database backup and it's twice the size you expected. You look closer: the wp_posts table has 12,000 rows. Your site has 400 posts and pages. The other 11,600? Revisions. Every draft save, every content tweak, every accidentally-hit Update button — WordPress kept them all. Forever.

A WooCommerce store with 400 products edited an average of 12 times has 4,800 invisible revision rows. They slow down queries, bloat backups, and serve no purpose after the first week.

What most people do instead

Edit wp-config.phpAdd define('WP_POST_REVISIONS', 5);. Requires FTP. Limits future revisions but doesn't clean up old ones.
Database optimization pluginsWP-Optimize, Advanced Database Cleaner. Full plugins with settings pages for what should be a one-time cleanup.
Manual SQL in phpMyAdminDELETE FROM wp_posts WHERE post_type = 'revision'. Risky if you get the query wrong. Requires server access.

Two commands: limit and clear

TrueCommander gives you two complementary commands. Limit revisions sets a cap on how many WordPress stores going forward. Clear revisions deletes the ones already in the database.

TrueCommander
847 revisions deleted
Clear RevisionsDone
Removed847 revisions
DetailAll post revisions removed from the database

Limit + Clear = clean forever. Set a limit to prevent future bloat, then clear old revisions to clean up the backlog. The two commands work together.

Two commands, one clean database

1
Set a revision limitlimit revisions -total=5 keeps max 5 per post. Use -total=0 to disable revisions entirely, or -total=-1 for unlimited.
2
Clear existing revisionsclear revisions deletes all stored revisions. Filter by post type with -post_type=product.
3
Database stays leanNew revisions respect the limit. Old ones are gone. No ongoing maintenance needed.
DetailValue
Limit commandlimit revisions -total=5
Clear commandclear revisions
Filter by typeclear revisions -post_type=post
Disable entirelylimit revisions -total=0
Remove limitlimit revisions -total=-1 (WordPress default)
Can be used in

Real example

You're managing a WooCommerce store with 400 products. Each product has been edited an average of 12 times. That's 4,800 revision rows in the database doing nothing.

First: limit revisions -total=3. From now on, WordPress keeps max 3 revisions per post.

Then: clear revisions. Result: 4,800 revisions deleted. The wp_posts table just lost thousands of rows. Database backup shrunk from 180 MB to 95 MB.

You add clear revisions to a monthly Cron Schedule. The database stays clean without you thinking about it again.

Per-command guides

Each revision command has its own detail page covering the specific parameter surface — type filters for clear, clamping and defaults for limit.

Goes further with TrueCommander

Ready?

Clean database, two commands.

This is one of 91 commands. All included with every license.

Cookies. The short version.

Essential cookies keep the cart and theme working. Analytics only fire if you say yes. Read our policy.