in WordPress

Change The Amount Of Wordpress Post Revisions Stored

WordpressWordpress has a autosave feature which will automatically save a revision of your post as you are typing. But the problem with this comes when you have a Wordpress blog with hundreds of posts. Each one of these posts will have a number of automatically saved post revisions. This can quickly add thousands of a posts to your wordpress database. The following Wordpress snippet will allow you to pick how many post revisions each post has or if you want to turn off the auto save feature. To change the post revision to save 3 revisions add the following to your wp-config.php file.


define('WP_POST_REVISIONS', 3);

To turn off the auto save feature add the following to your wp-config.php file.


define('WP_POST_REVISIONS', false);

Upgrade to access all content on Paulund

Members unlock all tutorials and snippets

Access to all downloadable content

Access to code examples before others

Sign Up Now

Already a member? Login here

Subscribe To The Weekly Newsletter

Get weekly updates to your email