How to Disable Autosave in WordPress (3 Easy Methods)

disable Autosave feature in WordPress and Elementor

WordPress autosave fires every 60 seconds. Each time it runs, it saves a new revision of whatever post you’re editing. Edit a blog post for an hour and you’ve stacked up 60 revisions in your database. Do that across a few hundred posts and your wp_posts table gets huge fast.

To disable autosave in WordPress, you have three options: edit wp-config.php, drop a snippet into functions.php, or install a plugin. All three take about 5 minutes. The real difference is how permanent you want the change to be.

Below you’ll find the exact code for each method plus a comparison table at the end. Everything works with the Classic Editor, Gutenberg, and page builders like Elementor.

Disable Autosave feature in WordPress website
WordPress autosave creates revisions every 60 seconds. Here’s how to turn it off.

What Is WordPress Autosave and Why Disable It?

Autosave is WordPress’s safety net. Every 60 seconds while you’re editing, it saves a temporary copy of your post. If your browser crashes or your Wi-Fi drops, you can recover the last autosaved version. Sounds useful, right?

It is, until you look at what it does to your database over time:

  • Database bloat — Every autosave adds a row to wp_posts. Thousands of revision rows pile up over months. I’ve seen sites where the revisions table was 10x larger than the actual content.
  • Slower queries — A bloated database means slower page loads. If you’re already working on speeding up your Elementor site, killing autosave is low-hanging fruit.
  • Page builder conflicts — Some page builders fight with WordPress autosave. You’ll occasionally see content get overwritten or save errors pop up out of nowhere.
  • Server load — Each autosave fires an AJAX request. On shared hosting, 20 editors autosaving every minute adds up quickly.
  • Messy drafts — If you’re testing layouts or styling a post, autosave keeps saving half-finished work you didn’t want saved.

Heads up: Once you disable autosave, WordPress won’t save anything in the background. Get in the habit of hitting “Save Draft” or “Update” regularly. I’ve lost a 2,000-word draft before because I forgot. Don’t be me.

Before You Start: Back Up Your Site

Methods 1 and 2 mean editing PHP files. One wrong character in wp-config.php or functions.php and your site goes white. So before you touch anything:

  1. Create a full site backup using a WordPress backup plugin like UpdraftPlus or BlogVault
  2. Make sure you have FTP or cPanel access to your hosting account (so you can fix the file if something breaks)
  3. Alternatively, install the File Manager plugin from the WordPress plugin directory to browse and edit files directly from your dashboard

Once you have a backup in place, pick one of the three methods below.

Method 1: Disable Autosave via wp-config.php (Recommended)

This is the cleanest way to disable autosave in WordPress. The wp-config.php file lives in your WordPress root directory and controls core settings. Unlike theme files, it doesn’t get wiped when you switch themes or update WordPress.

The trick: you set the autosave interval to 86,400 seconds (that’s 24 hours). WordPress technically still autosaves, but only once a day. Nobody edits a single post for 24 hours straight, so it’s effectively off.

Step 1: Access Your WordPress Root Directory

Log in to your hosting cPanel or connect via FTP (using FileZilla or similar). Navigate to your WordPress root directory, which is usually /public_html/ or /www/.

No cPanel or FTP? Install the File Manager plugin and browse files right from your dashboard. Handy if your host doesn’t give you direct access, or if you’d rather avoid server-level file editing altogether.

Step 2: Open wp-config.php

Find the wp-config.php file in the root directory. Right-click and select “Edit” (in cPanel) or download it (via FTP).

Step 3: Add the Autosave Interval Code

Scroll down and find the line that says:

/* That's all, stop editing! Happy publishing. */

Add the following code above that line:

// Disable WordPress Autosave (set to 24 hours)
define('AUTOSAVE_INTERVAL', 86400);

Save the file and upload it back (if using FTP).

What this does: AUTOSAVE_INTERVAL controls how often WordPress autosaves, in seconds. The default is 60 (once per minute). Setting it to 86,400 pushes it to once every 24 hours, which for all practical purposes means “never.”

Don’t want to kill it entirely? Use a longer interval instead. define('AUTOSAVE_INTERVAL', 300); sets it to every 5 minutes. Good middle ground if you still want a safety net but don’t need 60 revisions per hour.

Method 2: Disable WordPress Autosave via functions.php

This one deregisters the autosave JavaScript through your theme’s functions.php. Quick to do, but there’s a catch: switch themes and the code vanishes. Autosave comes right back.

Step 1: Open Your Theme’s functions.php

Go to Appearance > Theme File Editor in your WordPress dashboard. From the right sidebar, select Theme Functions (functions.php).

You can also navigate to /wp-content/themes/your-active-theme/functions.php via FTP or cPanel. If you’re using the Master Addons Theme Builder for headers and footers, this still works fine since the Theme Builder doesn’t replace your base theme’s functions file.

Step 2: Add the Disable Autosave Code

Paste the following snippet at the end of the functions.php file:

// Disable WordPress Autosave
add_action( 'admin_init', 'disable_autosave' );
function disable_autosave() {
    wp_deregister_script( 'autosave' );
}

Click Update File to save.

Disable Autosave using Theme Function File in WordPress
The autosave disable code added at the end of the functions.php file.

What this does: wp_deregister_script('autosave') tells WordPress to stop loading the autosave JS file in the admin. No script loaded, no autosave running. Simple as that.

Important limitation: This code lives inside your theme. If you switch to a different theme, the autosave disable code will be gone and autosave reactivates. For a permanent solution that survives theme changes, use Method 1 (wp-config.php) instead. You can also use a Code Snippets plugin to add this code in a theme-independent way.

Method 3: Disable WordPress Autosave Using a Plugin

Not comfortable editing PHP files? Fair enough. The Disable Gutenberg Autosave plugin does the same thing through a settings panel. It’s built specifically for the Gutenberg Block Editor.

How to Set It Up

  1. Go to Plugins > Add New in your WordPress dashboard
  2. Search for “Disable Gutenberg Autosave”
  3. Install and Activate the plugin
  4. Open any post or page in the editor
  5. Click the “Autosave settings” icon near the top-right corner of the editor
  6. Choose “Disable autosave” or set a custom interval (e.g., every 5 or 10 minutes)

Autosave stops the moment you activate the plugin. You can also toggle it back on for individual posts if you want, which is something the code methods can’t do.

Good for client sites: Install the plugin, set it up, and your client never has to think about it. If you’re building client sites with Master Addons and Elementor, the white label feature lets you rebrand the whole dashboard so the client only sees your agency name.

Video Tutorial: How to Disable Autosave in WordPress

If you’d rather watch than read, this video walks through the wp-config.php and functions.php methods. It shows exactly where to find the files and where to paste the code.

Which Method Should You Use?

Quick side-by-side of all three methods:

Featurewp-config.phpfunctions.phpPlugin
DifficultyEasy (copy-paste)Easy (copy-paste)Easiest (click-to-install)
Survives theme changeYesNoYes
Per-post controlNoNoYes
Custom intervalYes (any seconds)No (fully disables)Yes (preset options)
Adds a pluginNoNoYes
Works with GutenbergYesYesYes (built for it)
Works with Classic EditorYesYesGutenberg only
Best forPermanent, site-wide fixQuick test or single themeNon-developers, client sites

For most people, Method 1 (wp-config.php) is the way to go. One line of code, permanent, zero overhead. If you don’t want to touch files, the plugin works well too, especially since it gives you per-post toggling.

Bonus: Limit Post Revisions for Even Better Performance

Turning off autosave stops the automatic revisions, but WordPress still saves a revision every time you manually click “Save Draft” or “Update.” Those add up too, just more slowly.

You can cap the number of revisions WordPress keeps. Add this to your wp-config.php, right next to the autosave line:

// Disable Autosave (set to 24 hours)
define('AUTOSAVE_INTERVAL', 86400);

// Limit post revisions to 3 per post
define('WP_POST_REVISIONS', 3);

WordPress now keeps only the 3 most recent revisions per post. Older ones get deleted on their own. You can change the number to whatever you want. Setting it to false kills revisions entirely, but I wouldn’t do that unless you have a rock-solid backup system.

These two lines together make a noticeable difference on the database side. If you’re following SEO best practices for Elementor, a leaner database feeds directly into better page speed and Core Web Vitals numbers.

While you’re cleaning up the admin side of things, WP Adminify is worth a look too. It reorganizes the WordPress dashboard into something that actually makes sense.

Frequently Asked Questions

Is it safe to disable autosave in WordPress?

Totally safe. Autosave is a convenience feature, not something WordPress needs to function. The only downside is you could lose unsaved work if your browser crashes mid-edit. Just get in the habit of clicking “Save Draft” regularly, and keep a backup plugin running as a safety net.

Will disabling autosave break my Elementor or page builder?

Nope. Elementor, Beaver Builder, Divi, and Master Addons for Elementor all have their own save systems. They don’t depend on WordPress’s built-in autosave at all. Turning it off might actually help if you’ve been seeing weird save conflicts in your page builder.

Does disabling autosave improve WordPress performance?

It helps in two spots. One, it kills the AJAX request that fires every 60 seconds while you’re editing. Two, fewer revisions means a smaller database. On a site with hundreds of posts, cleaning up old revisions can shrink wp_posts by a surprising amount. More performance ideas in our Elementor speed guide.

Can I set a custom autosave interval instead of disabling it completely?

Yes. In the wp-config.php method, change the number to your preferred interval in seconds. For example, define('AUTOSAVE_INTERVAL', 300); sets autosave to every 5 minutes. The Disable Gutenberg Autosave plugin also offers preset interval options directly in the editor.

How do I clean up existing autosave revisions from my database?

Disabling autosave only stops new revisions from piling up. The old ones are still there. Use WP-Optimize or Advanced Database Cleaner to bulk-delete existing revisions, auto-drafts, and trashed posts. Back up your database first. If something goes wrong and you hit a server error after cleanup, that backup is your lifeline.

Wrapping Up

That’s the whole thing. Five minutes of work to disable autosave in WordPress and your database stays clean going forward. The wp-config.php method is permanent and survives everything. The functions.php method is quick but goes away if you change themes. The plugin gives you a toggle without touching code.

If you add the post revision limit from the bonus section too, you’ve basically done the easiest database optimization you’ll ever do. Pages load faster, the admin feels snappier, and phpMyAdmin stops making you nervous.

Questions about WordPress optimization or want to see what Master Addons can do for your Elementor site? Drop us a line.


Related reading: How to Speed Up Elementor Websites | Best WordPress Backup Plugins | Best SEO Practices for Elementor | WordPress Admin Dashboard Plugin

Picture of Roy
Roy
I'm Roy, part of the Master Addons for Elementor team. I write the tutorials, record the videos, and keep the documentation current, so you always know how to use every feature. I also handle support, so if you hit a snag, I'm the person who helps you fix it. Real answers, from someone who uses these tools every day.
Master Addons mid-year reset promotion banner offering 40% off

Still On The Fence? We Get It.

Every Master Addons Pro license comes with a 14-day no-questions refund, lifetime updates, and priority support. Try it risk-free this Spring – 40% OFF with “RESET40″ coupon.

No thanks, I'll pay full price later