How to Delete Post Revisions in WordPress (and Limit Them)
How do you delete post revisions in WordPress? Revisions are WordPress’s built-in safety net: every time you save or update a post, it keeps a copy you can restore. But they pile up. Years ago our backup service showed QuickOnlineTips had over 4,000 posts and more than 8,000 revisions, double the number of posts, which explained why our database kept growing. We limited revisions and cleared out the old ones. Here is how to do the same in 2026.

Quick answer: Back up your database, then delete old revisions with a plugin such as WP-Optimize, Advanced Database Cleaner or the Database tab in LiteSpeed Cache. To stop them piling up again, add define( 'WP_POST_REVISIONS', 5 ); to wp-config.php to keep only the last five revisions of each post.
Table of Contents
Why delete post revisions?
- Smaller database: thousands of revisions bloat the wp_posts table, making backups slower and larger.
- Faster queries: on large sites, a leaner database can speed up admin screens and some front-end queries.
- Cleaner backups and migrations.
Revisions are useful, though. They have rescued many crashed or accidentally overwritten posts for us, so the goal is to limit them, not switch them off.
Step 1: Back up your database
Deleting revisions is permanent. Take a database backup first with your host’s backup tool or a plugin. See how to back up and restore your WordPress database.
Step 2: Delete old revisions
Option A: LiteSpeed Cache (if you already use it)
Go to LiteSpeed Cache > Database > Manage and click Post Revisions to clean them. You can also set how many revisions to keep under DB Optimization Settings.
Option B: WP-Optimize
Install WP-Optimize, open WP-Optimize > Database, tick Clean all post revisions (you can keep the last few weeks) and click Run optimization.
Option C: Advanced Database Cleaner
Advanced Database Cleaner shows exactly how many revisions, auto-drafts and trashed items you have and removes them by type, with scheduled cleanups.
Option D: WP-CLI (for developers)
wp post delete $(wp post list --post_type=revision --format=ids) --forceOn very large sites, run it in batches. Back in 2011 we used the Delete Post Revisions plugin, which took over 20 minutes and three runs to clear our 8,000 revisions; today’s tools are much faster.

Step 3: Limit future revisions
Add these lines to wp-config.php, above the “That’s all, stop editing!” line:
define( 'WP_POST_REVISIONS', 5 ); // keep the last 5 revisions per post
define( 'AUTOSAVE_INTERVAL', 120 ); // autosave every 120 seconds instead of 60Use false to disable revisions completely, but we do not recommend it. Some hosts and caching plugins also offer a revision limit setting, which does the same without editing files.
Other database clean-up
While you are at it, clear auto-drafts, trashed posts, spam comments and expired transients; most cleaner plugins handle these in the same screen. For a deeper tune-up, read our guide to optimize your WordPress database.
How to check how many revisions you have
Database cleaner plugins show a count before you delete anything, which is the easiest way to see the size of the problem. If you have phpMyAdmin access through your hosting panel, run SELECT COUNT(*) FROM wp_posts WHERE post_type = 'revision'; (change wp_ if your table prefix is different). A few hundred revisions on a small blog is nothing to worry about; tens of thousands on a large, frequently edited site is worth cleaning up, ideally on a quiet day after a fresh backup.
FAQ
Is it safe to delete post revisions?
Yes, once you have a backup. It does not affect published content, only the older saved versions.
Can I delete revisions for a single post?
The block editor lets you browse revisions but not delete them individually; database cleaner plugins can remove revisions per post.
Do revisions slow down my site?
Usually only on large sites with many thousands of revisions. Limiting them is good housekeeping either way.
Get our free weekly email: new tech guides and tools, no spam.
New and updated tech guides, a free tool worth bookmarking and one useful pick, once a week. No spam, unsubscribe anytime.
One email a week. Unsubscribe anytime. See our privacy policy.







i have deleted all the revisions….
Wasn’t aware of the delete post revisions plugin … will be of great use to me as I keep on editing the posts for some or other reason
Amazing, after reading this post i got to know about ‘Post Revision. Before it, i have no idea about what Post Revision is for. :)
Yes, I am using this plugin and I run it once in a month to delete all previous revisions.