How to turn off post revision in wordpress and decrease database size.

// Blogging, Code, Design, For Geeks, Geeks, Wordpress, Wordpress Themes, wordpress tutorials


How to turn off post revision in wordpress and decrease database size.

delete_remove_turn_off_wordpress_post_revisionRevisions posts feature was introduced in wordpress 2.6 this feature turned on by default in 2.6+ versions. Revision posts create a lot of extra entries into your database and causes of database growing at very high speed.

So if you are worry about the size of your database or you don’t need hundreds or thousands of revisions posts in you database.

Here is the solution.

Open your wp-config.php into a text editor and add following lines into it.

define(’AUTOSAVE_INTERVAL’, 500 ); // seconds
define(’WP_POST_REVISIONS’, false );

This will increase the auto save time from 60 seconds to 500 seconds
and you will not get auto saved posts.

And if you want to delete already created revision posts from your database than go to your hosting control panel and open

PHPMyAdmin and run this SQL-query:

DELETE FROM wp_posts WHERE post_type = “revision”;

If you don’t want to edit your database there is a plugin Revision Control available for you.




Related Posts with Thumbnails





Share this Post..

2 Responses to “How to turn off post revision in wordpress and decrease database size.”

  1. [...] DivageekDesigns.com || How to turn off post revision in wordpress … Related Posts:Lastest News » Themes Featured on Divageekdesigns.comTurn Your WordPress Blog into a [...]

  2. Madeline Ong says:

    These are useful tips, and are especially advisable for users who don’t make major revisions to posts. On the other hand, I do know users who write posts in Wordpress itself, and revise them from there; for them, saving post revisions may be worth the database storage. Thank you for the tips!
    Madeline Ong´s last blog ..Book reviews My ComLuv Profile

Leave a Reply

CommentLuv Enabled
Want a Personal Avatar? Visit www.gravatar.com to get your own gravatar, a globally-recognized avatar.



Clixpy.com