Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 5 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -87,25 +87,26 @@ the database constants are correct.
**EXAMPLES**

# Standard wp-config.php file
$ wp core config --dbname=testing --dbuser=wp --dbpass=securepswd --locale=ro_RO
$ wp config create --dbname=testing --dbuser=wp --dbpass=securepswd --locale=ro_RO
Success: Generated 'wp-config.php' file.

# Enable WP_DEBUG and WP_DEBUG_LOG
$ wp core config --dbname=testing --dbuser=wp --dbpass=securepswd --extra-php <<PHP
$ wp config create --dbname=testing --dbuser=wp --dbpass=securepswd --extra-php <<PHP
$ define( 'WP_DEBUG', true );
$ define( 'WP_DEBUG_LOG', true );
$ PHP
Success: Generated 'wp-config.php' file.

# Avoid disclosing password to bash history by reading from password.txt
$ wp core config --dbname=testing --dbuser=wp --prompt=dbpass < password.txt
# Using --prompt=dbpass will prompt for the 'dbpass' argument
$ wp config create --dbname=testing --dbuser=wp --prompt=dbpass < password.txt
Success: Generated 'wp-config.php' file.



### wp config get

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

~~~
wp config get [--fields=<fields>] [--constant=<constant>] [--global=<global>] [--format=<format>]
Expand Down
8 changes: 4 additions & 4 deletions src/Config_Command.php
Original file line number Diff line number Diff line change
Expand Up @@ -76,19 +76,19 @@ private static function get_initial_locale() {
* ## EXAMPLES
*
* # Standard wp-config.php file
* $ wp core config --dbname=testing --dbuser=wp --dbpass=securepswd --locale=ro_RO
* $ wp config create --dbname=testing --dbuser=wp --dbpass=securepswd --locale=ro_RO
* Success: Generated 'wp-config.php' file.
*
* # Enable WP_DEBUG and WP_DEBUG_LOG
* $ wp core config --dbname=testing --dbuser=wp --dbpass=securepswd --extra-php <<PHP
* $ wp config create --dbname=testing --dbuser=wp --dbpass=securepswd --extra-php <<PHP
* $ define( 'WP_DEBUG', true );
* $ define( 'WP_DEBUG_LOG', true );
* $ PHP
* Success: Generated 'wp-config.php' file.
*
* # Avoid disclosing password to bash history by reading from password.txt
* # Using --prompt=dbpass will prompt for the 'dbpass' argument
* $ wp core config --dbname=testing --dbuser=wp --prompt=dbpass < password.txt
* $ wp config create --dbname=testing --dbuser=wp --prompt=dbpass < password.txt
* Success: Generated 'wp-config.php' file.
*/
public function create( $_, $assoc_args ) {
Expand Down Expand Up @@ -167,7 +167,7 @@ public function path() {
}

/**
* Get variables and constants defined in wp-config.php file.
* Get variables, constants, and file includes defined in wp-config.php file.
*
* ## OPTIONS
*
Expand Down