wp-config.php constants
Add these constants to wp-config.php, above the line /* That's all, stop editing! */.
Credentials
Section titled “Credentials”Every provider field can be set as a constant instead of being saved in the database. The name follows this pattern:
OMNIOFFLOADER_{PROVIDER}_{FIELD}define( 'OMNIOFFLOADER_CLOUDFLARE_R2_KEY', 'your-access-key-id' );define( 'OMNIOFFLOADER_CLOUDFLARE_R2_SECRET', 'your-secret-access-key' );A constant always wins over a saved value, and the settings screen shows that field as locked. See Credentials in wp-config.php for every provider and field name.
OMNIOFFLOADER_SAFE_MODE
Section titled “OMNIOFFLOADER_SAFE_MODE”Forces Safe mode on or off, whatever the plugin detects.
// This is a staging copy: never upload to or delete from the bucket.define( 'OMNIOFFLOADER_SAFE_MODE', true );// This site is the live site, even though its environment type is not "production".define( 'OMNIOFFLOADER_SAFE_MODE', false );| Value | Effect |
|---|---|
true |
Safe mode is always on. Nothing is uploaded to or deleted from cloud storage. |
false |
Safe mode is off, even if the site address changed, WP_ENVIRONMENT_TYPE is not production, or the site runs on a local address. |
| not defined | The plugin decides automatically (and the Protect the live site when this is a copy setting applies). |
While the constant is defined, the Settings screen shows Set by OMNIOFFLOADER_SAFE_MODE in wp-config.php.
Advanced: OMNIOFFLOADER_DISABLE_ENGINE
Section titled “Advanced: OMNIOFFLOADER_DISABLE_ENGINE”An emergency switch for debugging. When it is true, the offload engine does not start at all.
define( 'OMNIOFFLOADER_DISABLE_ENGINE', true );The WP-CLI commands tell you when this constant is on, for example:
Warning: Offload engine is OFF: disabled by OMNIOFFLOADER_DISABLE_ENGINE in wp-config.php.