Disable WordPress Autosave

Starting a website and blog has been a very interesting learning experience for me. I’m continually looking for ways to improve the blog and make it more enjoyable. That includes writing good content, and checking the stats at the end of the day.

I’ve noticed recently that the file admin-ajax.php has received a very high percentage of my web views. By the name, I could tell it was from the admin interface, and now I know it is the autosave function that calls a new page every time it saves the current blog post. This meant that when I leave the editing page open for an extended period of time while I’m writing, admin-ajax.php is hammering my web server. This has ruined my web stats, as it skews the data, but I have found a solution.

It turns out that disabling autosave completely isn’t that difficult. If you follow this, you must remember that WordPress will no longer save while you write, meaning you can lose work much easier.

To disable WordPress autosave, you must access your website FTP and edit wp-admin/post.php and wp-admin/post-new.php. In post.php, edit line 102 that says


by adding // to the beginning of the line. In post-new.php, edit line 6 in the same way so it reads


An example of the actual code is in the photo in this post.

If you ever want to restart the autosave function, just remove the // in both files.

[UPDATE]: I just noticed that autosave is also enabled for creating Pages. To modify the page editor, make the same changes to wp-admin/page-new.php and wp-admin/page.php.

[tags]Wordpress, autosave, website, blogs[/tags]

Posted in Wordpress Tagged with: , , , ,
6 comments on “Disable WordPress Autosave
  1. Thanks a lot for this find! Safari & autosave were driving me crazy…..

  2. Ken says:

    Very Useful. But I can’t find any file name “post_new.php” under wp-content directory. I’m sure it’s inside the wp-admin directory also. :)



  3. wesg says:

    Indeed you are correct. That should read wp-admin. The post has been corrected.

  4. Neo says:

    thanks a lot. auto save was a headache for me. it worked on 2.5.1.

  5. marius says:

    thnx very much for this easy trick :)

  6. Hey ! Love your blog.

Leave a Reply

Your email address will not be published. Required fields are marked *


Twitter: wesgood