How to disable and delete wordpress post revisions

Disable post revisions
Insert it into wp-config.php

define('WP_POST_REVISIONS', false);

Delete exist revisions

mysqldump -u username dbname -p > backup-db.sql
echo "DELETE FROM wp_posts WHERE post_type = 'revision';" | mysql -u username -D dbname -p

Over!

2 thoughts on “How to disable and delete wordpress post revisions”

Leave a Reply

Your email address will not be published. Required fields are marked *