Documentation
Forge Pro
Live-Site Block

Live-Site Block

Every power tool passes through one gate: is this site production? If it looks like production, every power tool is blocked, by default, with no exceptions.

How Detection Works

Detection is a best-effort heuristic. There is no fully reliable way to know from inside WordPress, so treat it as a safeguard and not a guarantee.

A site is treated as not production (power tools allowed) if either is true:

  1. WP_ENVIRONMENT_TYPE is local, development, or staging, or
  2. The site hostname contains one of these patterns: localhost, 127.0.0.1, .local, .test, .dev, .wpengine.com, staging., stage., .staging, dev., .dev.

Otherwise the site is treated as production.

Set define( 'WP_ENVIRONMENT_TYPE', 'staging' ); in wp-config.php to classify a site explicitly. If the hostname cannot be determined, the site is treated as production.

What Is Blocked

On a production-detected site, everything except the Site introspection tools (site info, plugins, theme, hooks, design authority, screenshot, page inspection, snapshot list, recent activity) is removed from the tool list the AI sees. That includes file read, database read, content blocks, and memory as well as every write tool. If a blocked tool is still called, it returns an error such as "Execution is blocked: this site looks like a production environment".

The Tools tab shows the current state, and wp forge status prints it from a terminal.

The Override

For the rare case where you deliberately need Forge Pro on something that looks like production:

Open the Tools tab

The override is offered as a "working on this site on purpose?" action.

Type the hostname

A confirmation modal requires you to type the site's own hostname. This is intentional friction, not an accident-prone checkbox.

Confirm

The override turns on and is locked to that exact domain.

Three safeguards apply:

  • Domain lock. If the domain changes (site cloned, migrated, renamed), the override automatically turns itself off and power tools revert to blocked.
  • Administrator required. Every power-tool call needs an Administrator account at call time, regardless of the configured acting user.
  • Both gates must allow. Enabling a tool group does not bypass the live-site block, and the override does not bypass per-tool toggles.

You can turn the override off any time from the General tab.

⚠️

Cloning a production database to staging and keeping the override enabled is the classic way to end up with power tools running somewhere unintended. The domain lock exists for that case: verify the override is off after any clone or migration.