Archive for ‘WordPress’

WordPress Post Revisions

Posted on: June 26th, 2012 by Dan Robert

As of version 2.6, WordPress introduced a feature which autosaves your posts as revisions while you are editing them in the dashboard. While this functionality can be very useful, it can also be a bit of an annoyance. If a single post ends up going through multiple edits or simply takes a while to get finished, those revisions can add up. I personally don’t see the need to have billions upon billions (ok, slight exaggeration) of revisions saved for every one of my posts. Additionally, that is just extra information that is getting stored in your database, which you may not need. Disabling this feature or limiting the amount of allowed revisions (which is what I opted for) is actually quite simple. It only takes one line of code in your wp-config.php file.

/** Disables WordPress automatic post revisions. **/
define('WP_POST_REVISIONS', false);

/** Limits revisions to specified number (second parameter). **/
define('WP_POST_REVISIONS', 5);
(more…)