The autosave feature in recent versions of WordPress (versions 2.5–2.7) is actually a misfeature:
… A misfeature is not a bug. Nor is it a simple unforeseen side effect; the term implies that the feature in question was carefully planned, but its long-term consequences were not accurately or adequately predicted (which is quite different from not having thought ahead at all).
The improper functioning of the WordPress autosave has bitten me several times. It’s supposed to prevent you from losing work by periodically saving your blog edits in the background, when in fact it has caused me to lose work by its very operation.
Basically, the most recent edits made to a blog entry often get dropped when you go to “Preview” or “Publish” the entry. In other words, during either of these two operations, it reverts you to what it had autosaved in the past and the new edits are lost. The frustrating thing is that most users would expect the “Preview” operation if not the “Publish” operation to properly save what’s in the edit box. So often, you might end up publishing an incomplete or incorrect version of your blog entry without even knowing it.
This is madness. Let’s stop it.
Find the following four files in the
wp-admin/ directory of your WordPress installation:
and comment out the following line:
by changing it to:
This will disable the autosave feature in the WordPress user interface.
A secondary part of the solution, too, is to always hit “Save Draft” before hitting “Preview”. I’m not sure if this is strictly necessary, but now I’m paranoid.
Thanks to Allen Day and William Lone for showing me how to do this.