In the following simple solution, I cover how to Disable WordPress autosave function. Some people, myself included, are having problems with the WordPress autosave feature. The feature was intended to automatically save your work in the background after a certain period of time to prevent you from losing your work.
However many of us are finding that our most recent post or page edits are getting lost when we go to preview and publish the entry.
How to Disable WordPress AutoSave
- Using your favorite FTP client, FTP to your WordPress installation.
- Navigate to your wp-admin directory and copy the files post.php, page.php, page-new.php and post-new.php to your desktop.
- Open each file with a text editor and find the following line:
wp_enqueue_script('autosave')
- And add // to the beginning of the line to comment it, and then save each file (the new line should look as follows):
// wp_enqueue_script('autosave')
- Using your FTP client, upload the files back to the server, replacing the original files with the edited files.
The Autosave feature in WordPress should now be disabled and you can proceed to edit your posts and pages without being interrupted with the autosaves and potentially losing your edits by an autosave overwrite.
You can also Disable WordPress Post Revisions to help eliminate database clutter.