Delete WordPress Post Revisions Using MySQL Tools

When you turn off or disable versions history or post revisions tracking feature in WordPress (which is added to all WordPress versions since the version 2.6), it is important that you delete/remove existing post revisions which are stored in the WordPress posts table.

You also need to delete/remove the changes made to the pages which are stored or saved in the database so as to reduce the size of the WordPress posts table, especially if the stored revisions or changes are abundant.

Follow the below mentioned steps to delete/remove all post revisions rows and entries that exist in the wp_posts table.

1> Login to the MySQL command-line tool, SQLyog, phpMyAdmin or any other GUI tools for MySQL.
2> Choose the proper WordPress database (incase the same server has more than one WordPress databases).
3> Now issue the below mentioned command. (It is advisable to keep a backup copy of the database before you perform the deletion).

DELETE FROM wp_posts WHERE post_type = “revision”;

The above procedure will purge all records related to post revisions and delete all revisions history. Now, you can no longer check the phase changes or compare versions. Administrators may also choose to delete post revisions in order to ensure privacy and prevent the writers or authors from detecting any changes made to their posts.

Related posts:

1> Disable WordPress post revisions.

NO COMMENTS

LEAVE A REPLY