WordPress Autosave and inflated page stats

Something that’s been driving me nuts about WordPress since I installed it, is the Autosave functionality. I often leave draft posts open for long stretches of time in a tab in Firefox, and over time my page view stats (which are admittedly low) are just plain wrecked by the roughly five or six thousand times a month I’m apparently hitting my own page — doubling my pageview counts and making it seem as though I’m my own sole visitor. So, in a fit of pique, I followed these super-simple instructions to disable autosaving, knowing full well that I hit the “Save Draft” button obsessively so chances are I’ll never lose a post as a result of this action. If I ever do, I’ll back link to this so you can laugh at me.

In case you have WordPress, and want to implement this hack too, newer versions of these files have the autosave line at different line numbers. Just search for ‘autosave’ (with quotes) and comment out just the first line you find in each of the files enumerated in the instructions.

Once I get a full month of legitimate stats, I might even post them once in a while. Unless implementing this hack proves to me that I AM my only visitor, in which case you’ll never hear about it again.

{advertisement}
WordPress Autosave and inflated page stats
{advertisement}

3 thoughts on “WordPress Autosave and inflated page stats

  1. 1

    Well, I’ll count as two visitors at the least since I read from both home and work. My home IP has been static for over a year, though it isn’t guaranteed as such by Comcast. My work IP comes from a wireless point I pick up somewhere nearby, and I have no idea what it might show. I could always turn on Tor at home, then you never know where I might be coming from!

    I did find out a bit more about the auto-save feature from a couple of places.
    One option, rather than completely disabling the feature, is to reset the frequency. By default, WordPress will auto-save a post every minute (60 seconds). To delay this, simply add the following code to your wp-config.php file:

    define('AUTOSAVE_INTERVAL',600);

    The number, 600 in the example, represents the number of seconds WordPress should wait between auto-saves. So, the above example would set WordPress to auto-save the post every 10 minutes.
    That will save you from having to re-edit the files to disable the autosave feature every time you upgrade. You might set it to something like 65536, which will leave you “auto-save free” for about eighteen hours.
    If you would like to disable the auto-save and/or revision system from the admin panel instead, someone has taken the liberty of creating a couple plugins that might help. Check out Disable Revisions and Autosave plugins at Exper Chaotic Flow.

  2. 2

    Oh.  Well, that’s brilliant.  I’ll go remove those hacks and get the plugin instead.  Thanks!

    Also:

    My work IP comes from a wireless point I pick up somewhere nearby, and I have no idea what it might show.

    HAW! Security fail.

    I’m assuming you work someplace near other workplaces / commercial sites. You could always find out who, by going to the default gateway IP, going to whatismyip.com then searching for it via arin.net, or just by walking around with your laptop / device until you find the point with the highest signal. If you cared enough. I know I would.

  3. 3

    Well, I know which access point we’re hooked up to. It’s a wireless router at a service provider who has an office across the street. I’m assuming they don’t mind, otherwise it would definitely be encrypted. We also have free wireless in nearby locations, but the service provider’s point is the best signal for us. Keep in mind that the ‘net access is simply for browsing. Only a handful ports are open through the router (HTTP, SMTP, POP, SSH). The PC in question is only used in any official capacity as a word processor. If it were completely up to me it would be running Linux, but it came with Vista, so Vista stays on it for now. I do all of my real work here at home. My other job has no true IT relationship.

Comments are closed.