Howto delete Existing WordPress Post Revisions:

To delete and remove all existing post revisions entries and rows from WordPress database Posts table, simply login to MySQL command-line interface, phpMyAdmin, SQLyog or other MySQL GUI tools.
Select the appropriate WordPress database (if you have more than one databases on the same server), and then issue the following command (it’s also recommended to backup the database before performing the deletion SQL statements):

DELETE FROM wp_posts WHERE post_type = “revision”;

WordPress provides constant WP_POST_REVISIONS that can be used in wp-config.php configuration file or plugin to set the status state for post revisions feature.
To turn off and disable automatic post revisions all versions saving feature in WordPress 2.6 or later version, simply add the following line of code to wp-config.php file located in the root or home directory of WordPress blog.

define(’WP_POST_REVISIONS’, false);

Although you says you can do this :

define(‘WP_POST_REVISIONS’, false);

to disable revisions, you can also do this

define(‘WP_POST_REVISIONS’, 3);

to limit the number of revisions to 3 (plus the autosave).

Not only that, if you now save a post/page which has more than 3 it will delete
the old ones for you!

Once set, WordPress does not attempt to save or store any revisions, except the one AutoSave per post.

Recommended Posts

No comment yet, add your voice below!


Add a Comment

Het e-mailadres wordt niet gepubliceerd. Vereiste velden zijn gemarkeerd met *