Go Back to Parent Doc

The demo lifecycle

Every sandbox moves through a predictable lifecycle, from the moment a visitor submits the request form to the moment it’s purged. This page explains each stage and the statuses a demo can hold.

The stages

1. Request

A visitor submits the demo request form with their email. TryDemo records a user row and a demo row (status Pending) and — unless auto-login is bypassed — sends the visitor a verification/activation email built from your notification template.

At this point no site has been cloned yet. The demo is just a reservation tied to a one-time secret.

2. Activation & creation

When the visitor follows the demo-access link in their email, TryDemo:

  1. Activates the user and creates (or reuses) a WordPress user account with a generated password.
  2. Clones the source/template site into a brand-new network site — copying its database tables and uploads, then search-replacing the old site URL and paths with the new sandbox’s.
  3. Adds the demo user to the new site with the configured login role and logs them in automatically.
  4. Stamps the sandbox with an expiration date (now + demo lifetime) and marks the demo as Active.
  5. Redirects the visitor into their live sandbox.

The clone deliberately skips network-wide tables (users, site meta, TryDemo’s own tables, and more) and protected upload folders so a sandbox never leaks or duplicates global data. Developers can adjust these skip lists — see tdemo_global_tables / tdemo_global_folders.

3. Exploration

The visitor uses the sandbox as an admin, limited to the areas you allow via Restrictions. If you’ve enabled the toolbar, a front-end bar shows a countdown and your purchase call-to-action.

4. Reset (optional)

If Enable reset is turned on in General settings, the demo user can reset their sandbox back to the source site’s pristine state. A reset re-clones the source into the existing sandbox — the demo’s URL, login, and expiration date do not change.

5. Expiration & purge

An hourly WordPress cron job (tdemo_purge_event) finds demos whose expiration date has passed and applies the configured expiration action:

ActionWhat happens
Delete (default)The sandbox site, its tables, and its upload folders are permanently removed
ArchiveThe site is archived (kept but inaccessible) and the demo marked Archived
DeactivateThe site is deactivated

Demos flagged as lifetime are always skipped by the purge job.

Archiving, deactivating, or deleting a site directly in Network Admin → Sites stays in sync automatically — TryDemo hooks the corresponding multisite actions and updates its demos table to match.

Demo statuses

StatusMeaning
PendingRequested but not yet verified/created
ActiveCloned, live, and accessible
ArchivedSite archived (e.g. by the expiration action)
DeactivatedSite deactivated
DeletedSite and data removed

(Internally, there is also a transient pending_creation state used while a verified demo is queued for site creation.)

Expiration actions

The action applied when a demo expires is set in General settingsDeleteArchive, or Deactivate.

Managing demos manually

Go to Network Admin → Demo → Demos to see every sandbox in a list table. From there you can:

  • Edit a single demo — change its status, expiration date, or lifetime flag.
  • Bulk-edit multiple demos at once.
  • Extend a demo by pushing out its expiration date.
  • Delete a demo immediately.
  • Mark as lifetime so it’s never purged.

See Reports for aggregate activity over time.

← Back to docs

Shopping Cart
  • Your cart is empty.