I was recently messing around with my website’s MySQL database, and I did something new and good. I searched around the internet and there is no script on the internet to delete WordPress post revisions using functions.php file, so I created one. Believe me, it’s easy as making milkshake.
Add following code to your theme’s functions.php file and it’ll delete all the post revision:
DELETE FROM $wpdb->posts
WHERE post_type = 'revision'
Hope this article helped you. If it helped you then please consider making a small amount of donation. Any amount, even $1.00, is appreciated.