How to change the autosave interval in WordPress

When editing a post, WordPress will create a revision automatically every 60 seconds. This revision is known as the autosave. You can increase or decrease the autosave interval by defining a constant in wp-config.php.

define( 'AUTOSAVE_INTERVAL', 45 ); // 45 seconds