delete all post revisions and all associated meta , comments, attachments and taxonomies
<?php
add_action('wp_footer','cleanup_revisions');
function cleanup_revisions(){
global $wpdb;
$sql = "SELECT `ID`
FROM ($wpdb->posts)
WHERE `post_type` = 'revision'
ORDER BY `ID` DESC";
$results = $wpdb -> get_results($sql,'ARRAY_N');
if($results){
echo "<!--";
$x = 0;
foreach ($results as $key => $value) {
wp_delete_post( $value['id']);
$x++;
}
echo "deleted $x post revisions -->";
}
}