How to turn off POST revisions in WordPress

May 01, 10 How to turn off POST revisions in WordPress

What is the POST revision?

Everytime someone edits a post, a new row is created in the wp_posts table.The number of rows grows as the number of edits grows.It is important to know that autosaves do not create revisions of the post.
This feature is useful only if there is more than one author on the blog, otherwise, it is useless, because you are the only author and you certainly don’t want useless database content.

How To Turn Off Post Revision In WordPress

To turn off the POST revision open your wp-config.php file and add this following line:

define(‘WP_POST_REVISIONS’, false);

However, this doesn’t mean that you’ve also deleted the already existing revisions from past edits; if there were any.To delete them, go to phpMyAdmin and firstly, backup your database(just in case) and then run the following 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’

That’s it.You’ve successfully turn off and deleted the POST revisions from your blog.

No related posts.

2 Comments

  1. I was pleased to read this article, keep up the good work.

  2. Thanks very much! Glad you found this article useful.

Leave a Reply


Warning: Unknown: write failed: Disk quota exceeded (122) in Unknown on line 0

Warning: Unknown: Failed to write session data (files). Please verify that the current setting of session.save_path is correct (/tmp) in Unknown on line 0