WordPress by default creates revisions of your posts automatically. Whenever you save a page or post, the older version is retained so that you can revert it back at any time.
Many people don’t know about the post revisions. Today i’m going to show you how to remove and disable Post Revisions in wordpress.
But before we begin I advise you to BACKUP YOUR DATABASE
Disable Post Revisions
Open wp-config.php located in your WordPress root directory and add the following code:
define(‘WP_POST_REVISIONS’, false);
Remove old Revisions
To delete all previous revisions, you will need to visit PHPMyAdmin and run the following SQL query.
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'
Do you like the post revisions feature? Do you think it’s worth removing?
The post How to Disable Post Revisions in WordPress appeared first on WPKube.