What is Post Revision
In WordPress every time you update your post or wordpress Autosave your post content it creates a revision. Revisions is basically a history. It maintains the record what changes (content removed,added) you made in each revision.
Revision is great way to maintain the history of a post. It is very helpful in case if you want to rollback your post to earlier version. But if you think it is not useful for you. Then you can disable them. Maintaining revision can takes a database space as well.
How to optimize wordpress database .
How to Disable Post Revisions in WordPress
To disable post revisions in wordpress, Open your wp-config.php file. It is present in root directory then add the following line.
1 |
define('WP_POST_REVISIONS',false); |
If you don’t want to disbale this feature but to limit the revision upto specific number.
1 |
define('WP_POST_REVISIONS', 3); |
It will limit the post upto 3 Revisions. You can keep any value which you think it’s good for you.
How to Delete Post Revisions
1. Manual Method
To delete previous post revisions, you can use phpMyAdmin or WordPress Adminer plugin and run the query mentioned below.
Deleting previous post revisions free
Manage WordPress Database Inside WordPress Dashboard
1 |
Delete From wp_posts where post_type="revision". |
2. Use Better Delete Revision wordpress Plugin to delete post revision.
Conclusion
Revision is a great way maintain post history, i don’t recommend to disable this feature. But if you think it’s not useful for you then you can disable it.