Code to Change Autosave Interval in WordPress

Add the below code to the wp-config.php file of your root directory to change Autosaving Interval. The default autosave interval in WordPress is 60 seconds. This means, any post/ page you edit will be automatically saved every 1 minute.

# Change Autosave Interval in WordPress
define('AUTOSAVE_INTERVAL', 300);

In the above code, remember to enter the value in seconds. 300 seconds equal to 5 minutes. So, every post and page will be automatically saved every 5 minutes. However, this will not increase the number of post revisions.