Skip to content
Gaurav TiwariDocs

Autosave and Draft Recovery in GT Page Blocks Builder

Updated October 17, 2026

GT Page Blocks Builder autosave keeps a recovery draft in your browser after you stop editing. It can recover a recent change, but it is separate from clicking Save and from a downloadable JSON export.

Use Save for the WordPress copy and Export for a file you can keep elsewhere. Browser recovery is a convenience for interruptions, not the only copy of your work.

How Autosave Works

Every time you make a change to any section (editing HTML, CSS, or JS; changing settings; adding or removing sections), an autosave is queued. The autosave fires 5 seconds after your last change, writing the current state of all sections to localStorage.

The autosave data includes.

  • All sections, including their identities, code, library references, display state and foreign-block data.
  • A timestamp of when the draft was saved.

The localStorage key is based on the post ID: md_pb_draft_123_u7 for post 123 and user 7. This means drafts are scoped to both the post and the user within the site’s browser storage.

Draft Recovery

When you open the visual builder, it checks localStorage for a saved draft for the current post. If a draft exists, you’ll see a browser confirmation dialog.

An unsaved draft was recovered. Restore it?

If you click OK, the builder loads the sections from the saved draft instead of from the post content.

If you click Cancel, the draft is discarded and the builder loads the post’s saved content normally.

When Drafts Are Cleared

The autosave draft is cleared in these situations.

  • Successful save. After “Save” completes successfully, the draft is removed.
  • Declined recovery. If you choose not to restore a draft, it’s deleted.
  • Embedded apply. If the builder sends sections to a parent window (embedded mode), the draft is cleared.

Limitations

Browser-local storage. Drafts are stored in the browser’s localStorage, which means.

  • They’re specific to the browser and device. A draft saved in Chrome on your laptop won’t appear in Firefox or on a different computer.
  • They persist across browser sessions until explicitly cleared.
  • They’re subject to the browser’s storage quota (typically 5-10 MB per origin).

No versioning. There’s only one draft per post. Each autosave overwrites the previous draft. There’s no undo history or version list.

No server-side backup. The draft exists only in localStorage. If you clear your browser data, the draft is lost.

Storage Errors

If localStorage is full or unavailable (e.g., in private browsing mode on some browsers), the autosave fails silently. No error is shown to the user, and the builder continues to function normally. The catch block in the save function absorbs the error.

Similarly, if the stored draft is corrupted or unparseable, it’s treated as non-existent and the builder loads from the post content.

Keep an Export Beside the Draft

The embedded assets make the course JSON convenient to move, but they also make it larger than a text-only section. Browser storage capacity varies, and an autosave can fail if its quota is exhausted.

  • Click Save to keep the WordPress copy.
  • Use Page Settings > Export for a separate JSON file.
  • Keep that file outside the browser before experimenting with major changes.

The current recovery format is versioned. Older incompatible drafts are discarded rather than partially restored. No recovery prompt can recreate changes that were never saved to storage.

Quick answers to common questions:

Where are autosaves stored?

Recovery drafts live in localStorage for the same site, browser, page and user. In version 3.0.0 the key includes both the post ID and user ID. They do not move across devices or replace server saves.

How do I recover work after a crash?

Reopen the same page in the same browser and account. If a compatible recovery draft exists, accept the restore prompt, review the sections and click Save. A missing or discarded browser draft cannot be recovered through that prompt.

Share

Was this helpful?

Still stuck? Open a support ticket