WordPress.org

Forums

mysql create new entry for every post modification (2 posts)

  1. gaebe
    Member
    Posted 6 years ago #

    I've just updated my blog to WP 2.7.1 and to a new webhost, and I noticed that mysql database creates a new entry in the wp_post table each time i modify an existing entry. So I end up seeing a lot of duplicate entries in phpmyadmin for the same post, though these duplicates does not show on my blog. So in phpmyadmin, the post_status says "inherit" rather than "post" and the post_name "000-revision" or "000-autosave", 000 being the post_id number... Is that normal with the new version of WP, and is there a way to stop WP from saving a new post everytime? Thanks.

  2. stvwlf
    Member
    Posted 6 years ago #

    Hi

    What you are seeing is the WP post revision system in action. That is how it works. If you don't want post revisions saved at all, or you want to limit the max # per post you can add some code to wp-config.php file in the WP install folder.

    add

    define ('WP_POST_REVISIONS', 15); //Defines max 15 revisions/post
    define('AUTOSAVE_INTERVAL', 900); // Auto-save 15 minute interval

    (default autosave is 60, 1 minute)

    if you want no revisions at all, instead use
    define ('WP_POST_REVISIONS', 0); //Defines no revisions kept

    A safe place to add this is just under the line
    define ('WPLANG', '');

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags

No tags yet.