---
title: Safe Mode
description: "## What it does Safe mode bypasses PHP snippet loading in the admin. No generated PHP snippet files are required. Safe mode is designed for recovering from a snippet-caused white screen of death (WSOD) when you cannot reach the normal…"
url: "https://brightleafdigital.io/docs/safe-mode/"
updated: "2026-10-20"
category: GravityOps Code Snippet Manager / Advanced
---

# Safe Mode

## What it does

Safe mode bypasses PHP snippet loading in the admin. No generated PHP snippet files are required. Safe mode is designed for recovering from a snippet-caused white screen of death (WSOD) when you cannot reach the normal GOCSM admin page.

Safe mode does not disable JS or CSS snippet enqueueing; it only stops PHP snippet execution.

## How to trigger it

Use the pre-built admin URL in **Settings > Recovery: Safe Mode**:

```
https://yoursite.com/wp-admin/admin.php?page=gravityops-code-snippet-manager&gocsm_safe_mode=1&_gocsm_safe_mode_nonce=<nonce>
```

Click **Reveal safe-mode URL** to show it. The URL opens the snippet list. The nonce is tied to your logged-in session and expires according to WordPress nonce timing. You can bookmark the URL shown in the Settings tab for emergency use, but you may need to reveal a fresh URL if the nonce expires.

## Admin-only

Safe mode requires an active WordPress session with GOCSM management access (the `gform_full_access` capability when Gravity Forms is active, otherwise `manage_options`). It is intentionally limited to admin-area requests; adding the parameter to public frontend URLs does not activate safe mode.

## How long it lasts

Opening the safe-mode URL turns safe mode on for that browser for one hour, so you can move between admin pages without adding the parameter again. It applies only to your login: it ends when you log out, and other users are unaffected.

Change the duration with the `gocsm_safe_mode_duration` filter, in seconds. Return `0` to limit safe mode to the single request that carries the parameter.

```
add_filter( 'gocsm_safe_mode_duration', fn() => 15 * MINUTE_IN_SECONDS );
```

Add this filter in a small plugin or MU plugin, not a snippet: snippets do not run in safe mode.

## Disabling safe mode

Click **Exit safe mode** in the "GOCSM Safe Mode is active" notice, or wait for it to expire. The notice shows when it ends.

If a PHP snippet is consistently causing a fatal, deactivate it through the admin UI while in safe mode, then exit safe mode.
