To Autosave or Not
Wordpress has an autosave feature that will automatically save your content every 60 seconds. If you have ever made a big mistake while working on a post or article, autosave can be your White Knight saving you from hours of re-typing.
The problem arises if you have a lot of content that becomes malformed when it is saved in the editors visual mode. This content can be blocks of code, embedded in videos, even those pesky paragraph tags that
Adjust the Autosave Interval
There is no simple directive to turn off the WordPress autosave. You can change its interval from the standard 60 seconds to whatever you would like by simply putting the following directive in the wp-config.php file found in your WordPress root folder:
|
1 |
define('AUTOSAVE_INTERVAL', 360 ); // seconds |
If you want to basically turn off autosave you can increase the Interval to some very high number. The other option is creating your own plugin.
Turn Off Autosave Altogether
Create a Simple Plugin
To just turn autosave off or disable it, you create your own simple 5 line plugin. To accomplish this you need to create a text file with the name of say turn-off-autosave.php. The next step you will copy the following code into this text file.
|
1 2 3 4 5 6 7 8 9 10 11 12 13 |
<?php
Plugin Name: Turn Off Autosave
Description: This is a very simple plugin that turns off the Wordpress autosave function. It simply deregisters the autosave script. You could do the same by increasing the autosave interval time - 60 seconds - by adding define('AUTOSAVE_INTERVAL', 360 ); into the wp-config.php file. This plugin has no settings and is not located in a folder.
function turn_off_autosave()
{
wp_deregister_script('autosave');
}
add_action( 'wp_print_scripts', 'turn_off_autosave' );
?> |
Thirdly, you will take this text file and place it in your WordPress plugin folder which is found inside the wp-content folder. Lastly, you will then activate this plugin by finding the name ‘Turn off Autosave’ in the inactive plugin list.
That is it.





