Skip to content

Framework Bypass Mode

Emergency Debugging Mode for Hard-to-Track Issues

This guide explains how to use the Framework's bypass mode for debugging complex issues where the framework itself might be interfering with troubleshooting efforts.

Warning: Bypass mode should ONLY be used for debugging purposes and at your own risk.

What Is Framework Bypass Mode?

Framework bypass mode disables the main framework components while maintaining minimal WordPress functionality. When enabled, it only loads:

  • Environment variables from your .env file
  • Basic WordPress database and cookie constants
  • Skips all custom constants, configurations, and framework components

This creates a bare-bones environment to isolate whether issues are caused by the framework or underlying WordPress/server configuration.

Required Configuration

1. Enable the Bypass Constant

Add this constant in your wp-config.php file before any other Framework code:

php
/**
 * SHOULD only be used in cases where you need to debug something.
 * When set to true, Raydium will not be loaded - only DB credentials and salts are loaded.
 * The rest of the framework will be disabled and custom constants will not be loaded.
 *
 * Run at your own risk. This is here for those hard-to-track-down bugs or in rare cases
 * where you need to bypass the framework entirely.
 */
define('DANGEROUSLY_DISABLE_RAYDIUM', true);

2. Required Environment Variables

Ensure your .env file contains:

bash
# Database Configuration
DB_NAME=your_database_name
DB_USER=your_database_user
DB_PASSWORD=your_database_password
DB_HOST=localhost

# Required for cookie generation
HOME_URL=https://your-site.com

What Gets Loaded vs Bypassed

Loaded:

  • Database constants (DB_NAME, DB_USER, etc.)
  • Cookie constants and authentication
  • Basic WordPress functionality

Bypassed:

  • All Framework features and configurations
  • Custom constants and routing
  • Security and performance enhancements

When to Use This Mode

Use bypass mode only for:

  • Framework conflicts: When you suspect the Framework is causing issues
  • Emergency access: When the Framework prevents site access
  • Plugin compatibility: Testing if plugins work without Framework
  • Debugging: Isolating Framework vs. WordPress/server issues

Never use for production sites or as a long-term solution.

Automatic Detection

The Framework automatically detects when DANGEROUSLY_DISABLE_RAYDIUM is enabled and uses the AppDisabled class instead of normal initialization. No additional configuration is required.

Verification

To verify bypass mode is working:

  1. Confirm DANGEROUSLY_DISABLE_RAYDIUM is set to true
  2. Test basic WordPress functions (admin access, database connectivity)
  3. Verify Framework features are disabled
  4. Check that core WordPress functionality still works

Troubleshooting

Common issues:

  • Database connection fails: Check .env database credentials
  • Undefined constant errors: Ensure required environment variables are set
  • Site completely broken: Underlying WordPress/server issues revealed

Recovery

To exit bypass mode:

  1. Set DANGEROUSLY_DISABLE_RAYDIUM to false or comment it out
  2. Clear any caches
  3. Test that normal Framework functionality returns

Remember: This is a debugging tool, not a solution. Always disable it once debugging is complete.