How to modify or disable Autosave in WordPress

AutoSave is one of the most useful features of WordPress. It protects you from losing content, which can happen, for example, when you suddenly go off the internet or shut down your computer. By default, WordPress automatically saves content every 60 seconds.

Autosave Gutenberg also supports autosave, but it happens in the background and does not display information about it. The content is also protected when trying to leave the page when the changes are not published or updated yet.

Warning When trying to leave the page when you load a page or post where an unpublished automatic update is available, WordPress displays information about the most recent version available at the top of the screen. However, if for some reason you want to change the save interval or disable the feature completely, it works. Tip: If you want to downgrade, you can use the review.

How to change the AutoSave interval

If you want to reduce or increase the interval to automatically save content, you need to edit the wp-config.php file, which can be found in the main WordPress folder. The code above: required_once (ABSPATH. & ; wp-settings.php); Otherwise, it will have no effect.

The number 120 in our example indicates the time interval for saving in seconds. Up to 120 seconds with us. You can customize the number to suit your needs.

How to disable autosave

You can disable automatic saving of content in WordPress in two ways: Edit wp-config.php in the wp-config.php file, located in the main folder in WordPress, Insert: Definition ( AUTOSAVE_INTERVAL); By modifying the jobs.php template, the best way to disable autosave is to insert the snippet below in the jobs.php file in template.

Add_action (& # 39; admin_init & # 39 ;, & # 39; disable_autosave & # 39;); autosave & # 39;);} The code records the script that provides autosave.

8 Comments

Add a Comment

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