Archive for the ‘Wordpress’ Category
How To Turn Off Post Revision In WordPress 2.6 and better
Comments Off on How To Turn Off Post Revision In WordPress 2.6 and better
One of the irritating feature for me in WordPress 2.6 is the post revision. I am the only author of my blog and hence this feature is useless to me.
Just in case you are wondering how post revision works, whenever a post is edited, a new row will be created in wp_posts table. Hence if your posts or pages got edited 10 times, you will have 10 new rows in wp_posts table.
In no time your wp_posts table will be filled up and the post ID will be huge.
To turn off this feature, add this following code to wp-config.php:
define('WP_POST_REVISIONS', false);
You can also delete all post revisions by running this query in phpMyAdmin:
DELETE a,b,c FROM wp_posts a LEFT JOIN wp_term_relationships b ON (a.ID = b.object_id) LEFT JOIN wp_postmeta c ON (a.ID = c.post_id) WHERE a.post_type = 'revision'
Be sure to backup your database first before performing any queries in phpMyAdmin.
Da Tag(s): database, mySQL, php, wp-config.php Da Categorie(s): Wordpress