Skip to main content

WordPress Tutorial: Disable Autosave

WordPress does a good job at saving headaches for editors by including helpful functions such as automatically saving posts when the post edit screen is open.

The only problem with this particular feature is that it creates an overhead on the server that can impact performance on the front-end, customer facing website. This problem becomes even more pronounced when you have multiple editors writing posts at the same time. The automatically saved posts build up into a large amount of database inserts that can form a bottleneck on the server.

Using the following code it is possible to remove the autosave functionality and help speed things up. Just remember to tell your editors to save their work locally before using WordPress to publish the post.

Add the following snippet to your function.php file:

add_action( 'wp_print_scripts', 'disable_autosave' );
function disable_autosave() {
wp_deregister_script('autosave');
}

Looking for Expert WordPress or Drupal development?

I am a freelance website developer and designer based in the UK. I work as a remote Drupal developer, WordPress developer and Front-end developer for a variety of startups, charities and international businesses in Bristol, Bath, London and Europe. You can learn more about me by visiting my resume page.

Get in touch for a free quote on your next project and if you want to connect me with then check out my LinkedIn profile.