How To Turn Off Post Revision In WordPress
- Digital Engineering
How To Turn Off Post Revision In WordPress
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.
*UPDATE* Auto Saves does not create a revision of the post.”
Related content
Auriga: Leveling Up for Enterprise Growth!
Auriga’s journey began in 2010 crafting products for India’s