WordPress autosave feature
The autosave feature in WordPress serves as a safety net, protecting your work in the event of unexpected issues. As you create or edit a post, WordPress automatically saves a draft of your work every 60 seconds. This means that if your internet connection drops, your browser crashes, or your computer loses power, you won’t lose all the changes you’ve made. When you go back to edit the post, WordPress will show you a notice about the autosave and give you the option to restore it. This feature is designed to save you time and prevent the frustration of losing your work.
Please note that only one autosave is stored at a time; newer autosaves overwrite older ones.
How to disable the autosave feature in WordPress
Disabling the autosave feature in WordPress can be done in two ways: using a plugin or adding code to your theme’s functions.php
file.
Method 1: Using a Plugin
- Install and activate the “Disable Gutenberg Autosave” plugin.
- Open the WordPress Gutenberg block editor.
- Click the ‘Autosave Settings’ icon at the top right corner of the page/post.
Method 2: Adding Code to functions.php File
- Sign in to the WordPress backend using an administrator account.
- Place your mouse cursor on ‘Appearance’ among the options on the left pane, then click ‘Theme File Editor’.
- Select the
functions.php
file among the Theme Files. - Paste the following code in that file:
add_action('admin_init', 'disable_autosave');
function disable_autosave() {
wp_deregister_script('autosave');
}
- Click on ‘Update file’ button to disable WordPress autosave feature.
Please note that modifying your site’s code can have unintended side effects. Always backup your site before making changes to the code.
Post revisions
WordPress incorporates a handy functionality known as post revisions, designed to facilitate the process of undoing changes and reverting to earlier versions of posts and pages. As you work on each draft, WordPress automatically generates a temporary revision, referred to as auto-save, at intervals of 60 seconds.
In addition to auto-saves, WordPress creates post revisions whenever a user interacts with the save, update, or publish button. These revisions are permanently stored in the WordPress database, accessible for review and restoration from the post-edit screen.
This feature proves particularly beneficial during the content creation phase, where numerous tweaks and edits are commonplace. Post revisions offer a comprehensive view of your writing process, allowing you to observe the evolution of your post. Navigating between different states of your draft enables seamless modifications, ensuring your article reaches its optimal state before publication.
For WordPress sites with multiple authors, post revisions become an invaluable tool for editors. They facilitate the efficient management of contributions from various authors, streamlining the editorial process.