In a multi-server environment, if you want a consistent configuration without having to patch the automatically generated wp-config.php, there should be a way to pass the common keys and salts.
*
* --extra-php
* : If set, the command reads additional PHP code from STDIN.
+ *
+ * --keys-and-salts
+ * : Use existing secrets versus generating afresh as the default behavior.
*
* ## EXAMPLES
*
}
// TODO: adapt more resilient code from wp-admin/setup-config.php
-
- $assoc_args['keys-and-salts'] = self::_read(
- 'https://api.wordpress.org/secret-key/1.1/salt/' );
+ if ( ! isset( $assoc_args['keys-and-salts'] ) ) {
+ $assoc_args['keys-and-salts'] = self::_read(
+ 'https://api.wordpress.org/secret-key/1.1/salt/' );
+ }
$out = Utils\mustache_render( 'wp-config.mustache', $assoc_args );
file_put_contents( ABSPATH . 'wp-config.php', $out );