Exper Chaotic Flow - Abstract Design
Exper Chaotic Flow
  • Random Images

  • Rebirth (a precious Name or a Smile)
    Rebirth (a precious Name or a Smile)

    It
    It's hard to walk tall when you're small! #1

    In a flash
    In a flash

    Round & Round
    Round & Round
  • Spam Blocked

  • Quotes

    Those who travel very slowly may yet make far greater progress, provided they keep always to the straight road, than those who, while they run, forsake it.
    Rene Descartes, Discourse on the Method

    Lo so che parlo perche' parlo ma che non persuadero' nessuno; e questa e' disonesta' - ma la rettorica mi costringe a forza a far cio' - o in altre parole "e' pur necessario che se uno ha addentato una perfida sorba la risputi".
    C. Michelstaedter, La Persuasione e la Rettorica

    SOCRATES: Eh! What can be feared when one is doing one’s duty? I know the rage of my enemies. I know all their slanders; but when one only tries to do good to men and when one does not offend heaven, one can fear nothing, neither during life, nor after death.
    Voltaire, Socrates, ACT II

  • WordPress revisions and autosave problem

    24th July 2008


    Edit 25 July 2008
    I’ve prepared three plugins that can disable Revisions, Autosave or both of them at the same time.
    Access here: Disable Revisions and Autosave plugins


    I’ve recently updated my blog to the last WordPress 2.6 version.
    The new version is very bold and I want generally suggest everyone to upgrade to it.

    But I’ve also got to say that all the new version goods are mined by a major new introduced feature, a big problem to me and some other users out there: I’m talking about the Revisions and the new AutoSave function.
    Revisions simply save the posts many times: WP will add a new row in the DB every time an user change a post; this could be good when the blog is maintained by different editors, cos they can track the various versions/revisions of every post, but it’s actually totally resources wasting to all the single editors ones.
    AutoSave now create a second copy of the post that is stored and used to keep the post up-to-date when a subsequent AutoSave is executed on the same one. This is quite annoying too. I never liked much the AutoSave and the new implementation is even worser to me.

    I’ve started roaming around the net looking for a solution.
    I’ve found a couple of workarounds that can completely solve the problem when used at the same time.

    STEP 1 – by me

    I’ve found that clearing all the cookies relative to your Wp’s domain installation is always a good start when you make an update.
    This is good too on 2.6 especially if you’re going to use the new SSL ones.

    STEP 2 – Stop the Revisions scheme – Lester Chan article

    To turn off the revisions edit the wp-config file adding this following code after the DB settings lines.

    define(‘WP_POST_REVISIONS’, false);

    You can also delete all post revisions by running this query in phpMyAdmin:
    Be sure to backup your database first before performing any queries in phpMyAdmin.

    DELETE FROM wp_posts WHERE post_type = ‘revision’;

    STEP 3 – Stop the AutoSave – Untwisted Vortex article

    Lester reports that AutoSave doesn’t create a revision.
    This is not completely true cos some users (I’m on the same boat) have reported that one revision is created by AutoSave too; it’s actually not clear if this is a behavior resulting from a WP’s bug/problem or a particular provider’s systems configuration.

    The solution is to create a plugin that stops the AutoSave function.

    <?php
    /*
    Plugin Name: Disable Autosave
    */
    function disable_autosave() {
    wp_deregister_script('autosave');
    }
    add_action( 'wp_print_scripts', 'disable_autosave' );
    ?>

    Select the above reported code, copy it and paste it into a new blank text document.
    Save it as “disable-autosave.php”, upload it to the WP’s plugins directory and then activate the plugin.

    I’ve also prepared the plugin version here: disable-autosave.zip (Right Click, Save As)

    Share this Post
    • Facebook
    • Twitter
    • email
    • Add to favorites
    • Print
    • StumbleUpon
    • Google Bookmarks
    • Technorati
    • Yahoo! Buzz
    • Live
    • MSN Reporter
    • Ping.fm
    • MySpace
    • Reddit
    • Netvibes
    • Digg
    • del.icio.us

    10 Responses to “WordPress revisions and autosave problem”

    1. easecehiemy Says:

      Hello.
      :)

      “The birth took place at the couple’s home (just outside Oslo),” says the palace, adding mother and baby were both well.
      Bye.

    2. edith Says:

      Very interesting, thank you.

    3. Anonymous Says:

      Thanks your message has very much helped me:)

    4. Hoang Says:

      This is so cool! Thank you for all!
      Can you explain how the plug-in works please?

    5. Exper Says:

      Hi Hoang,
      sorry for the long delay.
      It simply disables the WP’s AutoSave function. ;)
      Take a look here too: Disable Revisions and Autosave plugins

    6. 爱茶族 Says:

      爱茶网为福建茶商与全国茶商提供茶叶批发,茶叶销售的平台,本站为免费申请会员,免费发布茶叶信息,提供全面详细的茶资讯.

    7. Free Stuff Says:

      Thanks for sharing…..

    8. JaneRadriges Says:

      The best information i have found exactly here. Keep going Thank you

    9. MichaellaS Says:

      tks for the effort you put in here I appreciate it!

    10. Fay Says:

      Nice write up…usually I never reply to these thing but this time I will,Thanks for the great info.

    Leave a Reply