• I noticed that the database quickly gets bigger and bigger due to autosaves… is there a way to purge all those autosaves from the database?

Viewing 4 replies - 1 through 4 (of 4 total)
  • Autosaves and revision have advantages.

    Do you want to delete the current saved one, Disable the feature or limit the number of autosaves?

    Thread Starter marcnyc

    (@marcnyc)

    I wanted to do all three things really… I think WP should have added these autosaves and revisions in a different table, but really I want to make sure the database stays small and speedy…
    I found a plugin called “Revision Diet” that allowed me to limit the number of revisions (I set it to 0) and to remove some revisions but not all of them went away. Then I installed a plugin called WP-Optimize which seemed to have removed the other revisions as well.
    It’d be great if there was the option to do so from within WP.

    Since you’ve removed them all so I’ll just skip that part…

    To disable autosaving and revisions add this line to the “wp-config.php” file if it isn’t present.

    define(‘WP_POST_REVISIONS’,false);

    To limit the number of the auto saves add this line…

    define(‘WP_POST_REVISIONS’,5);
    5 is the number of revisions.

    Uo increase the duration of the interval between different autosaves…
    define(‘AUTOSAVE_INTERVAL’,900);
    900 represents the number of seconds between each autosave.

    You’re welcome.

    Thread Starter marcnyc

    (@marcnyc)

    Thanks for this

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘removing all autosaved posts from database’ is closed to new replies.