- How WP_POST_REVISIONS values behave
- Setting a cap in wp-config.php
- What happens when a post hits its cap
- The per-post filter for developers
- Autosaves don't pile up
- No dashboard button for deleting revisions
- Where revisions live, and what they track
- How Notion handles page history
- My advice before you change the setting
- Frequently asked questions
By default, WordPress has no post revisions limit: it stores every revision of a post. You can cap it by setting WP_POST_REVISIONS in wp-config.php, for example define( 'WP_POST_REVISIONS', 3 ), or with the wp_revisions_to_keep filter. A value of false or 0 stores no revisions, and old ones are deleted automatically on the next update.
Out of the box, there isn't a limit. WordPress keeps a record of each saved draft and published update for as long as the post exists. On a site with long posts edited many times, that history adds up, which is why people go looking for the setting.
How WP_POST_REVISIONS values behave
| Setting | What WordPress keeps | Applies to |
|---|---|---|
| true (the default) or -1 | Every revision | WP_POST_REVISIONS |
| false or 0 | No revisions, except the one autosave per post | WP_POST_REVISIONS |
| Any integer above 0 | That many revisions per post, plus one autosave per user | WP_POST_REVISIONS |
| Autosaves | One for each user, per post | All posts and pages |
| Per-post override | Whatever the wp_revisions_to_keep filter returns | Developers |
Setting a cap in wp-config.php
The constant goes in your site's wp-config.php file. WordPress's documentation gives this line as its example:
define( 'WP_POST_REVISIONS', 3 );
The 3 is only an example: put in whatever number suits how your team works. Add the line, save the file, and the new limit applies from then on. Because wp-config.php controls the whole site, take a copy before you edit it, or ask whoever manages your hosting to make the change.
What happens when a post hits its cap
Old revisions are deleted automatically when the post is updated again. So if you set a cap on a site that already has a long history, nothing changes the moment you save wp-config.php. The trimming happens post by post, the next time each one is updated. If you set the value to false or 0, WordPress stops storing revisions, apart from the single autosave per post.
The per-post filter for developers
The wp_revisions_to_keep filter lets developers change how many revisions are kept for a given post. That's useful when one type of content needs a longer history than the rest, for example pages a legal or compliance team edits, while blog posts keep a short one. It's code, so it belongs in a plugin or theme your developer maintains.
Autosaves don't pile up
A common worry is that autosaves fill the database. They don't. There's only ever a maximum of one autosave per user for any given post, and new autosaves overwrite old ones, so the tables don't grow by a row every 60 seconds. Autosaves don't overwrite published content either. They're stored as a special type of revision, marked with an Autosave label.
No dashboard button for deleting revisions
WordPress.org Documentation is clear on the limitation. The default is no limit at all, and WordPress has no interface for deleting revisions, only an API function. Capping is done in wp-config.php or by a developer filter. And whatever limit you set, it doesn't touch autosaves: one per user per post always remains.
Where revisions live, and what they track
Revisions are stored in the posts table as children of the post, with post_status set to inherit and post_type set to revision. By default WordPress tracks changes to the title, author, content and excerpt. That's enough to restore an earlier version of the words, which is what most editors use revisions for.
Want AI doing the heavy lifting in your marketing?
I build the systems that handle the boring 80 percent, so you get your week back. Done properly, with the human kept in.
How Notion handles page history
Notion takes a timed approach to version history: it records a new version of a page every 10 minutes while you actively edit it, and another two minutes after your last edit. For more on running a WordPress site well, my list of WordPress plugins worth installing and my guide to WordPress design and development for beginners cover the wider setup.
My advice before you change the setting
Decide whether you want a cap at all. Unlimited revisions are the default for a reason: they let you roll back any edit. If you do want one, set WP_POST_REVISIONS to a number your team is comfortable with, back up wp-config.php first, and remember the trimming happens the next time each post is updated. Leave autosaves alone; WordPress already keeps them to one per user per post.
Want your tool on this list? Featured spots and reviews here are paid partnerships. Here's how to partner with me.
Frequently asked questions
What is the default WordPress revision limit?
There's none by default: true or -1 stores every revision.
How do I limit revisions?
Add define( 'WP_POST_REVISIONS', 3 ); to wp-config.php, with your own number in place of 3.
How do I turn revisions off?
Set WP_POST_REVISIONS to false or 0; one autosave per post is still kept.
Do autosaves fill up my database?
No. There's a maximum of one autosave per user per post, and new ones overwrite old ones.
Can I delete revisions in the dashboard?
WordPress documents an API function but no UI for deleting revisions.

