Many times we forget to save a post when writing article or posts on a WordPress site. WordPress autosave feature is one of the best feature that gives us a peace of mind while editing a post or page on wordpress site. Refer to the solution section to get more understanding about this feature.
- How to use WordPress AutoSave?
- WordPress Autosave feature
- How to adjust WordPress AutoSave parameter?
- WordPress AutoSave feature is not working
By default, WP automatically saves draft of your post, page or a custom post type every 60 seconds. However, there are situations where we may need to change this interval. For example, if we have a slow internet connection or some other issue, we need to increase the interval so the browser does not get hung as frequently when WordPress saves a draft or post. Additionally, if we want to minimize the chances of losing edits to a post, we can decrease the auto-save interval so WordPress saves them more frequently.
In order to adjust WP auto-save parameter refer to the following steps.
Login to your web server
Go to your www root or website Document root directory.
In the Document root directory, you’ll see a wp-config.php file.
Open the file using vi editor or some other editor of your choice.
If you are using Cpanel, login to your CPanel and navigate wp-config.php file, then right click on that file and select edit to modify the file.
Find the following line in wp-config.php file.
require_once(ABSPATH . 'wp-settings.php');
- Add the following config line to the wp-config.php file just above the above config line. Replace X with the number of seconds you want WordPress to wait to save drafts or posts.
define( 'AUTOSAVE_INTERVAL', X ); Eg: We need to save post or page on every 300 seconds. define( 'AUTOSAVE_INTERVAL', 300 );
- Final config should look like below.
define( 'AUTOSAVE_INTERVAL', 300 ); require_once(ABSPATH . 'wp-settings.php');
Save changes and restart Apache or Nginx service.
On Cpanel, saving changes on the file, Cpanel will reload or restart service on its own.
Many wordpress custom theme or editor doesn’t support this feature however this feature has no issue with default WordPress editor.