મુખ્ય સામગ્રીને બાયપાસ કરો

DefineWpConfigConstsStep

Defines PHP constants for WordPress. Use the method option to write them to wp-config.php.

This step can be called multiple times, and the constants will be merged.

@hasRunnableExample
@example
<code>
{
"step": "defineWpConfigConsts",
"consts": {
"WP_DEBUG": true
}
}
</code>

Index

Properties

consts

consts: Record<string, unknown>

The constants to define

optionalmethod

method?: rewrite-wp-config | define-before-run

How Playground defines the constants.

  • define-before-run (default) uses PHP's auto_prepend_file setting to define constants with string, number, or boolean values before the requested script runs. These values take precedence over later definitions in wp-config.php. This method skips null, arrays, and objects. Use it to keep wp-config.php intact, for example when working with a mounted project.
  • rewrite-wp-config adds or updates the corresponding define() calls in wp-config.php. Use it to replace an existing definition in that file or to keep the constants in a wp-config.php you plan to use outside Playground.

step

step: defineWpConfigConsts

optionalvirtualize

virtualize?: boolean
@deprecated

This option is noop and will be removed in a future version. This option is only kept in here to avoid breaking Blueprint schema validation for existing apps using this option.

Page Options