wp config <command>

Generates and reads the wp-config.php file.

Subcommands

NameDescription
wp config create

Generates a wp-config.php file.

wp config delete

Deletes a specific constant or variable from the wp-config.php file.

wp config edit

Launches system editor to edit the wp-config.php file.

wp config get

Gets the value of a specific constant or variable defined in wp-config.php file.

wp config has

Checks whether a specific constant or variable exists in the wp-config.php file.

wp config is-true

Determines whether value of a specific defined constant or variable is truthy.

wp config list

Lists variables, constants, and file includes defined in wp-config.php file.

wp config path

Gets the path to wp-config.php file.

wp config set

Sets the value of a specific constant or variable defined in wp-config.php file.

wp config shuffle-salts

Refreshes the salts defined in the wp-config.php file.

Command documentation is regenerated at every release. To add or update an example, please submit a pull request against the corresponding part of the codebase.