GCBGutenberg
Control Blocks
Buy

Reference

wp-config constants

Reference, generated from the plugin source

Constants GCB reads when they are defined, usually in wp-config.php. Found by reading the plugin's defined() checks; the description is the docblock of the code that reads it.

PHP
// wp-config.php
define('GCBLITE_COMPONENT_SERVER_URL', 'https://your-frontend.example.com');
ConstantRead in
GCBLITE_BUILDER_DISABLE_WRITESincludes/RestAPI/BuilderAPI.php:266
GCBLITE_COMPONENT_SERVER_URLincludes/Admin/Settings.php:299
includes/Assets/EditorAssets.php:87
includes/Frontend/Url.php:37
GCBLITE_EDITOR_PREVIEWincludes/Blocks/BlockLoader.php:532
includes/RestAPI/RenderAPI.php:299
GCBLITE_FORCE_COMPONENT_SERVERincludes/RestAPI/RenderAPI.php:257
GCBLITE_GOOGLE_MAPS_API_KEYincludes/Integrations/GoogleMapsKey.php:43
includes/Integrations/GoogleMapsKey.php:76
GCBLITE_LOAD_EXAMPLESincludes/Blocks/BlockLoader.php:315
includes/RestAPI/BuilderAPI.php:308
GCBLITE_RENDER_SECRETincludes/Admin/Settings.php:364
includes/Frontend/Secret.php:48
GCBLITE_REVALIDATE_ENABLEDincludes/RestAPI/CacheRevalidator.php:147
GCBLITE_REVALIDATE_SECRETincludes/RestAPI/CacheRevalidator.php:162
GCBLITE_REVALIDATE_URLincludes/RestAPI/CacheRevalidator.php:154

GCBLITE_BUILDER_DISABLE_WRITES

Hosts that didn't get a deliberate second switch via GCBLITE_BUILDER_DISABLE_WRITES.

Where it is first read (includes/RestAPI/BuilderAPI.php:266):

PHP
if (defined('GCBLITE_BUILDER_DISABLE_WRITES') && GCBLITE_BUILDER_DISABLE_WRITES) {
    return new WP_Error(
        'gcblite_builder_writes_disabled',
        'Builder writes have been disabled on this site via GCBLITE_BUILDER_DISABLE_WRITES.',

GCBLITE_COMPONENT_SERVER_URL

GCBLITE_COMPONENT_SERVER_URL constant in wp-config.php.

Where it is first read (includes/Admin/Settings.php:299):

PHP
$is_overridden = defined('GCBLITE_COMPONENT_SERVER_URL') || has_filter('gcblite_frontend_url');
?>
<input
    type="url"

GCBLITE_EDITOR_PREVIEW

Where it is first read (includes/Blocks/BlockLoader.php:532):

PHP
    || (defined('GCBLITE_EDITOR_PREVIEW') && GCBLITE_EDITOR_PREVIEW);

// Log for diagnosis regardless.
if (function_exists('error_log')) {

GCBLITE_FORCE_COMPONENT_SERVER

Environment override: when the gcblite_force_component_server filter returns true (or the GCBLITE_FORCE_COMPONENT_SERVER constant is truthy) and a frontend URL is configured, skip PHP rendering and route the block through the component server even if render.php exists.

Where it is first read (includes/RestAPI/RenderAPI.php:257):

PHP
if (defined('GCBLITE_FORCE_COMPONENT_SERVER') && GCBLITE_FORCE_COMPONENT_SERVER) {
    return true;
}
return (bool) apply_filters('gcblite_force_component_server', false);

GCBLITE_GOOGLE_MAPS_API_KEY

GCBLITE_GOOGLE_MAPS_API_KEY constant in wp-config.php.

Where it is first read (includes/Integrations/GoogleMapsKey.php:43):

PHP
if (defined('GCBLITE_GOOGLE_MAPS_API_KEY') && is_string(GCBLITE_GOOGLE_MAPS_API_KEY)) {
    return self::sanitize(GCBLITE_GOOGLE_MAPS_API_KEY);
}

GCBLITE_LOAD_EXAMPLES

The plugin's bundled examples/blocks/ directory, IF GCBLITE_LOAD_EXAMPLES is defined as truthy in wp-config.php.

Where it is first read (includes/Blocks/BlockLoader.php:315):

PHP
if (defined('GCBLITE_LOAD_EXAMPLES') && GCBLITE_LOAD_EXAMPLES) {
    $example_blocks = GCBLITE_PLUGIN_DIR . 'examples/blocks';
    if (is_dir($example_blocks)) {
        $dirs = array_merge($dirs, glob($example_blocks . '/*', GLOB_ONLYDIR) ?: []);

GCBLITE_RENDER_SECRET

GCBLITE_RENDER_SECRET constant (wp-config.php).

Where it is first read (includes/Admin/Settings.php:364):

PHP
$is_overridden = defined('GCBLITE_RENDER_SECRET') || has_filter('gcblite_render_secret');
$resolved      = \GCBLite\Frontend\Secret::get();
$masked        = $resolved !== ''
    ? str_repeat('•', max(0, strlen($resolved) - 4)) . substr($resolved, -4)

GCBLITE_REVALIDATE_ENABLED

Where it is first read (includes/RestAPI/CacheRevalidator.php:147):

PHP
if (defined('GCBLITE_REVALIDATE_ENABLED')) {
    return (bool) GCBLITE_REVALIDATE_ENABLED;
}
return (bool) get_option('gcblite_revalidate_enabled', false);

GCBLITE_REVALIDATE_SECRET

Where it is first read (includes/RestAPI/CacheRevalidator.php:162):

PHP
if (defined('GCBLITE_REVALIDATE_SECRET') && is_string(GCBLITE_REVALIDATE_SECRET) && GCBLITE_REVALIDATE_SECRET !== '') {
    return GCBLITE_REVALIDATE_SECRET;
}
$opt = get_option('gcblite_revalidate_secret', '');

GCBLITE_REVALIDATE_URL

Where it is first read (includes/RestAPI/CacheRevalidator.php:154):

PHP
if (defined('GCBLITE_REVALIDATE_URL') && is_string(GCBLITE_REVALIDATE_URL) && GCBLITE_REVALIDATE_URL !== '') {
    return GCBLITE_REVALIDATE_URL;
}
$opt = get_option('gcblite_revalidate_url', '');

Built from GCB Lite 0.4.0 (ce232d4). Source: includes/.

Copyright © 2026 Runchain. WordPress is a trademark of the WordPress Foundation.