How to Disable WordPress Autosave?

by | Last updated Dec 23, 2024 | Published on Dec 23, 2024 | WP Tutorial | 2 comments

How to Disable WordPress Autosave? Do you know? Every 60 seconds your post automatically saved by the WordPress system in your database as post revisions. Actually, this is a useful feature in WordPress. When you lost your connection, or your computer shut down suddenly, you can restore your post back.

But, not all people like this feature for certain reasons. One of them is, all your autosave will be kept on your server, and it will not delete except you delete it. Sometimes, this autosave will be like trash on your server where you must delete for it.

Imagine if you write your post about for one hour. How many post revision on your server saved?

Do not worry. Actually, you can control it or eliminate it permanently.

Disable WordPress Autosave

There are three methods you can follow it.

Method 1: Modify function.php File

Step 1: Log into your cPanel.

Step 2: Navigate to your installation WordPress folder and paste the code below into your function.php.

add_action( ‘admin_init’, ‘disable_autosave’ );
function disable_autosave() {
wp_deregister_script( ‘autosave’ );
}

Method 2: Modify wp-config.php File

Step 1: Log into your cPanel.

Step 2: Navigate to your installation WordPress folder and paste the code below into your wp-config.php.

define(‘AUTOSAVE_INTERVAL’, 86400);

Method 3: Modify post.php File

Step 1: Log into your cPanel.

Step 2: Navigate to your installation WordPress folder.

Step 3: Open your wp-admin/post.php file and wp-admin/post-new.php files. Then, search the code below.

wp_enqueue_script(‘autosave’);

Then, change the code above with add “//” at the front. It looks something like this.

//wp_enqueue_script(‘autosave’);

Conclusion

In this tutorial, you have learned how to disable WordPress autosave while you post something. Please re-think if you want to disable it in your WordPress installation.

2 Comments

  1. If you like this article, then please FOLLOW our Linkedin, Twitter, YouTube, Pinterest, and Facebook. Do not forget to check our services page to upgrade your WordPress. If you find this post has an issue with copyright, outdated, or in error, please contact us to fix it.

    • FaizAlias

      welcome 🙂

      Reply

Submit a Comment

Your email address will not be published. Required fields are marked *

Category

E

WP Tutorial

E

WooCommerce

E

Divi Theme Tutorial

E

cPanel Tutorial

E

SEO & Performance

E

Compare & Review

E

Grammarly

E

Blogger Talk

E

View All Categories

Arbor Design

895 South Randall Road, Chicago

Arbor & Landscaping

4999 Old Orchard Center, Chicago

Let's start work together

Pin It on Pinterest