Loading

How to Delete WordPress Post Revisions or auto saved posts




Its important to maintain your database table size and optimize them regularly when your blog is regularly being updated.

Delete and remove all existing stored post revisions and changes made on pages stored in the database in order to reduce the wp_posts table size, especially when there is already tons of revisions or changes been kept.

Method 1

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”;

Once all post revisions related records is purged, all revision histories is deleted, and users no longer able to check the changes by phase or compare differences between versions.

Method 2

Add the below line to  to your wp-config.php file and  change the 6 to however many revisions you want or -1 to keep them.

define(‘WP_POST_REVISIONS’,6);

Method 3

Also you can use the WP plugin here   to delete old revisions.

Hope you enjoyed the post, let us know your comments

1 Star2 Stars3 Stars4 Stars5 Stars (3 votes, average: 4.67 out of 5)
Loading ... Loading ...

You might want to read these as well

Loading...







How to Delete WordPress Post Revisions or auto saved posts

Joshu is the Founder of the OrangeCopper Webmaster's Community, He had been designing & developing web applications as a freelancer in this field for the past 9 years. OC was born in 2002 December and since 2004 Joshu had been Blogging on the Web about what he learned the Hard way, So that you could learn it the Easy Way. Follow OrangeCopper on Twitter and you would be Auto-Followed.


blog comments powered by Disqus