How to manage Autosave on WordPress
Marc Wagner
February 21, 2022
WordPress saves your posts / pages automatically in certain time intervals. You are surely used to something similar from Word or OpenOffice. This function is used to ensure that in case of a connection loss or a crash of your computer, not all data is lost.
Customize Autosave in WordPress #
You can set the time interval in which the backups are performed. To do this, open the wp-config.php of your WordPress instance with an editor (e.g. Notepad++) and add the following line:
define('AUTOSAVE_INTERVAL', 300);
The 300 stands for the seconds that must elapse in order to perform a storage. In our case this would be 5 minutes. You can enter any value here.
Disable Autosave in WordPress #
The automatic saving can be deactivated in WordPress by removing the corresponding script. To do this, open the functions.php which is located in the directory of your theme. Add the following code snippet to the file:
add_action( 'admin_init', 'disable_autosave' );
function disable_autosave() {
wp_deregister_script( 'autosave' );
}
Now the automatic saving should be prevented.
Fazit #
WordPress is very flexible and allows you to define just about all settings according to your own wishes. As a WordPress agency, we deal with the various setting options on a daily basis. If you have any questions, please feel free to contact us.
Artikel von:
Marc Wagner
Hi Marc here. I’m the founder of Forge12 Interactive and have been passionate about building websites, online stores, applications and SaaS solutions for businesses for over 20 years. Before founding the company, I already worked in publicly listed companies and acquired all kinds of knowledge. Now I want to pass this knowledge on to my customers.