WordPress Autosave Not Working - Content Lost Fix

You're writing a blog post in WordPress. You've been typing for 30 minutes. You're in the zone. You've written 1,500 words. Great post. You're about to hit publish.

Then your internet drops for 5 seconds.

You see a warning: "Connection lost. Waiting to reconnect."

You wait. Connection comes back. You refresh the page.

Everything is gone. You're back to an empty editor. All 1,500 words—vanished.

"Where's autosave?" you scream internally. "WordPress is supposed to save this every 60 seconds!"

This happened to a client last week. She wrote for 45 minutes on a critical product announcement. Her connection hiccupped. All the content disappeared. Autosave had saved nothing. We found the recovery, but it took digging.

The post should have been recoverable in 30 seconds. It took us an hour.

That's why you need to know how autosave works, why it fails, and how to recover if it does.


Why Autosave Fails (The Common Causes)

Autosave isn't as automatic as the name suggests. It needs several things to work:

  1. The server must be reachable (network connection is stable)
  2. The REST API endpoint must be working (WordPress REST API is functioning)
  3. The browser must allow JavaScript to run (no extensions blocking it)
  4. The server must have free disk space to save drafts
  5. The database must be able to insert new revisions
  6. The PHP session must stay active (server timeout settings)

If any one of these fails, autosave silently stops working. You keep typing, thinking you're safe, but you're not.

Common reasons autosave stops:

  • Network hiccup: Your internet drops for 3 seconds. Autosave request times out. WordPress gives up trying. You don't get a warning.
  • REST API blocked: A security plugin or server firewall blocks requests to /wp-json/. Autosave can't reach the endpoint.
  • Slow server: The autosave request takes 15 seconds to complete. The next autosave starts before the previous one finishes. They pile up and the server gives up.
  • Disk space full: WordPress tries to save but there's no disk space for new revisions. Silently fails.
  • Database issues: The wp_posts table is corrupted. Database inserts fail.
  • PHP session timeout: You've been editing for 2 hours. PHP session expires. Autosave requests get rejected as unauthorized.
  • Browser extension: Grammarly, ad blockers, or security extensions intercept autosave requests.
  • Server memory exhausted: Hosting hits memory limit. Autosave requests start getting killed.

Step 1: Immediate Recovery - Recover Lost Content

If you just lost content, there are several places WordPress might have saved it.

Check browser cache/drafts

  1. Press Ctrl+Shift+Delete (or Cmd+Shift+Delete on Mac)
  2. Go to Browsing Data
  3. Set timeframe to "Last hour"
  4. Uncheck everything except "Cookies and other site data"
  5. Clear
  6. Go back to WordPress editor, create a new post (don't navigate away first)
  7. Check if your text is in browser local storage (some browsers auto-recover)

Your browser might have cached the text in local storage. Clearing and reconnecting sometimes triggers recovery.

Check WordPress post revisions

Even if autosave failed, WordPress might have saved a revision.

  1. Go to Posts > All Posts
  2. Look for a draft or pending post that looks like the one you were editing
  3. Click it to open
  4. Look for a "Revisions" box on the right side
  5. Click "Browse Revisions" or similar link
  6. Look for an older saved version of the post
  7. Click on it to view and restore

Revisions are different from autosave. Revisions are saved when you explicitly hit "Save Draft" or "Publish." They're more reliable but fewer of them.

Check wp_posts table directly

If the post shows up nowhere, check the database.

  1. Go to your hosting control panel (cPanel, Plesk, etc.)
  2. Open phpMyAdmin or similar database tool
  3. Select your WordPress database
  4. Find the wp_posts table
  5. Click Browse
  6. Look for posts with post_status = "auto-draft" or "draft"
  7. Look at the post_date and post_modified columns
  8. If you find a post that matches the time you were editing, click it
  9. You might be able to see the post_content field with your text

This is getting technical, but if your text is in the database, you can manually copy it out.

Check database backups

  1. Check if your hosting has auto-backups (most do)
  2. Find a backup from just before you lost content
  3. Restore the database (or just the wp_posts table)
  4. Log back in and check if the draft is recovered

If you have daily backups, you can often recover the lost content this way. You'll only lose work since the last backup, not everything.


Step 2: Understand Why Autosave Failed

Enable debug logging

To find out exactly why autosave stopped working, enable logging:

  1. Edit wp-config.php
  2. Change: define( 'WP_DEBUG', false );
  3. To:
    define( 'WP_DEBUG', true );
    define( 'WP_DEBUG_LOG', true );
    define( 'WP_DEBUG_DISPLAY', false );
    define( 'SCRIPT_DEBUG', true );
  4. Save and upload

Reproduce the autosave failure

  1. Create a new post
  2. Start typing
  3. Wait 60+ seconds (autosave should fire)
  4. Check the browser's Network tab (F12 > Network)
  5. Look for requests to /wp-json/wp/v2/posts or /wp-admin/admin-ajax.php?action=heartbeat
  6. Do these requests succeed or fail?
  7. If they fail, what's the error?

Check debug log

  1. Download wp-content/debug.log
  2. Search for "autosave", "rest", "nonce", "permission"
  3. Look for errors from when you were typing

The debug log often shows the exact reason autosave is failing.


Step 3: Fix Based on the Root Cause

If autosave requests are timing out

Error: "Request timeout" or "504 Gateway Timeout"

Fix: Increase PHP timeout settings

php_value max_execution_time 300
php_value default_socket_timeout 60

Add to .htaccess. Or increase memory limit in wp-config.php:

define( 'WP_MEMORY_LIMIT', '256M' );

Also check: Is your server slow? Run Query Monitor and see if database queries are taking 5+ seconds each. If so, database optimization is needed (see "Database Optimization" section).

If REST API is blocked

Error: "403 Forbidden" when accessing /wp-json/

Causes: Security plugin blocking it, firewall blocking it, server misconfiguration

Fix:

  1. Deactivate all security plugins temporarily
  2. Try creating a post (does autosave work now?)
  3. If yes, one of the security plugins is blocking REST API
  4. Re-enable plugins one-by-one to find the culprit
  5. Check the plugin settings and whitelist WordPress internal requests

If hosting is blocking it: Contact your hosting provider and ask them to allow /wp-json/ requests.

If a plugin is interfering

Error: Autosave seems to work but content doesn't save

Fix:

  1. Deactivate all plugins
  2. Try editing a post (does autosave work?)
  3. If yes, reactivate plugins one-by-one
  4. When autosave stops working, you've found the culprit
  5. Contact the plugin developer or find an alternative

If browser extension is blocking autosave

Error: Autosave requests don't appear in Network tab

Fix:

  1. Open WordPress in Incognito mode (no extensions)
  2. Create a post
  3. Does autosave work now?
  4. If yes, an extension is the problem
  5. Disable extensions one-by-one until you find it

Common culprits: Grammarly, ad blockers, Ghostery, uBlock Origin (if configured too aggressively)

If disk space is full

Error: "No space left on device" in debug.log

Check disk usage:

df -h

Look for your WordPress partition. If it's 95%+ full, that's the problem.

Fix:

  1. Delete old backups from wp-content/backups/
  2. Clear cache if using a caching plugin
  3. Delete unused media files
  4. Ask hosting to expand storage or clean up old log files

If database is corrupted

Error: "Database query error" or "MySQL error" in debug.log

Fix:

  1. Edit wp-config.php and add:
    define( 'WP_ALLOW_REPAIR', true );
  2. Visit yoursite.com/wp-admin/maint/repair.php
  3. Click "Repair and Optimize Database"
  4. Wait for it to finish
  5. Remove the WP_ALLOW_REPAIR line from wp-config.php
  6. Try autosave again

If PHP session is timing out

Error: "Unauthorized" or "401 Forbidden" in autosave requests after 2+ hours of editing

Fix: Increase PHP session timeout

php_value session.gc_maxlifetime 86400

Add to .htaccess or .user.ini file. Or contact hosting to increase it globally.


Step 4: Test Autosave

After fixing the issue, verify autosave is working:

  1. Create a new post
  2. Type a sentence
  3. Open browser Developer Tools (F12)
  4. Go to Network tab
  5. Wait 60+ seconds
  6. Look for a request to /wp-json/wp/v2/posts (Gutenberg) or /wp-admin/admin-ajax.php?action=heartbeat (Classic Editor)
  7. If you see the request and it shows "200 OK", autosave is working
  8. Close the tab without publishing
  9. Create a new post again
  10. Do you see a "Restore" button showing your previous draft?
  11. If yes, autosave is definitely working

Real-World Autosave Failure Story

Scenario: A news site had multiple editors publishing simultaneously. Random posts would save but have only partial content—the last 1,000 characters would be missing. Autosave appeared to be working, but content loss was happening.

What was happening:

  1. Five editors writing posts at the same time
  2. Autosave requests piling up on the server
  3. The REST API endpoint was getting overwhelmed
  4. Some autosave requests were getting cut off midway
  5. When the editor saved the post, it saved the incomplete version

Root cause: Server wasn't sized for concurrent autosave requests. The hosting couldn't handle 5 concurrent autosave operations.

Our fix:

  1. Increased PHP memory limit from 128M to 512M
  2. Increased max execution time from 30s to 120s
  3. Increased autosave interval from 60 seconds to 120 seconds (less frequent saves, less server load)
  4. Upgraded hosting from shared to dedicated
  5. The complete stack fix was necessary, not just one change

Result: Autosave became reliable. No more partial content loss.


Autosave Interval Configuration

By default, WordPress autosaves every 60 seconds. If your server is slow, you can change the interval:

In wp-config.php, add:

define( 'AUTOSAVE_INTERVAL', 300 ); // Autosave every 5 minutes instead of 60 seconds

Why increase it? If your server is struggling with autosave requests, fewer requests = less load.

Trade-off: You lose more content if something goes wrong. With 5-minute intervals, you could lose 5 minutes of work instead of 1 minute.

Don't make it longer than 10 minutes. Beyond that, you're not really protecting yourself.


Post Revisions and Autosave

Autosave ≠ Revisions

Autosave: Happens automatically every 60 seconds. Saves drafts. You don't see them in the editor unless autosave fails.

Revisions: Saved when you hit "Save Draft" or "Publish". Every published post keeps up to 25 old versions. You can see them in the editor and restore them.

If autosave fails but you hit "Save Draft", you'll have a revision you can recover.

Disable autosave revisions to save database space: Add to wp-config.php:

define( 'WP_POST_REVISIONS', 5 ); // Keep only 5 revisions per post

Prevention: Make Autosave Reliable

1. Monitor autosave regularly

Create a post once a week and verify autosave is working. Look in the Network tab and confirm requests are being sent and succeeding.

2. Increase PHP limits preemptively

Don't wait for autosave to fail. Set these in wp-config.php:

define( 'WP_MEMORY_LIMIT', '256M' );
define( 'WP_TIMEOUT', 300 );

3. Keep plugins updated

Old plugins can interfere with autosave. Update them regularly.

4. Whitelist WordPress endpoints in security plugins

If you use Wordfence, iThemes Security, or similar, configure them to not block /wp-json/ or WordPress's internal requests.

5. Use managed WordPress hosting

Platforms like Kinsta and WP Engine have autosave pre-optimized. Cheap shared hosting often has issues with concurrent autosave requests.

6. Enable regular database backups

If autosave fails catastrophically, you'll want recent backups to recover from. Use UpdraftPlus or BackWPup to auto-backup daily.

7. Educate users to save manually

Tell your writers: "Don't rely only on autosave. Hit 'Save Draft' every 15-20 minutes." This is a safety net if autosave fails.


Autosave Troubleshooting Checklist

Content got lost and autosave didn't save?

  • ✓ Check browser cache for local storage recovery
  • ✓ Check WordPress Revisions for older drafts
  • ✓ Check wp_posts table in database
  • ✓ Check hosting backups for recovery

Autosave isn't working (confirmed via Network tab)?

  • ✓ Enable debug logging
  • ✓ Check if REST API is being blocked (security plugin or firewall)
  • ✓ Check if autosave requests are timing out (Network tab shows 504)
  • ✓ Check disk space (df -h)
  • ✓ Check database integrity (repair database)
  • ✓ Deactivate all plugins and test
  • ✓ Test in Incognito mode (browser extensions)

After fixing, verify it works:

  • ✓ Create a test post
  • ✓ Type content
  • ✓ Watch Network tab for autosave request after 60 seconds
  • ✓ Close without publishing
  • ✓ Create new post—do you see "Restore" option?

The Real Talk

Autosave is a safety net, not a guarantee. It relies on a lot of things working correctly. Network connection, server availability, database, plugins, PHP settings. Fail one of those and autosave silently stops.

The worst part is that it fails silently. You keep typing, thinking you're safe, but you're not.

The best protection is:

  1. Verify autosave works (check Network tab periodically)
  2. Save manually every 15-20 minutes (Ctrl+S in Gutenberg or click Save Draft)
  3. Keep backups so that even if everything fails, you can recover
  4. If you're writing something important, write it in Google Docs or a text editor first, then copy it into WordPress

I know it sounds paranoid. But I've seen too many writers lose hours of work because they trusted autosave and it failed silently.

Be paranoid. Save manually. Keep backups. Your future self will thank you when autosave fails and you still have your content.