From 3217e19b2280bccad31074e33b5cd83e5ee83fe2 Mon Sep 17 00:00:00 2001 From: hbhalodia Date: Mon, 22 May 2023 19:44:26 +0530 Subject: [PATCH 1/2] Feat: provide support to skip config for multisite convert Provided the support to skip the configuration of wp-config file by passing the --skip-config associate param. This is already being added for multiiste install command. --- src/Core_Command.php | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/Core_Command.php b/src/Core_Command.php index 2024fa9e..094e2cc8 100644 --- a/src/Core_Command.php +++ b/src/Core_Command.php @@ -449,6 +449,9 @@ public function install( $args, $assoc_args ) { * [--subdomains] * : If passed, the network will use subdomains, instead of subdirectories. Doesn't work with 'localhost'. * + * [--skip-config] + * : Don't add multisite constants to wp-config.php. + * * ## EXAMPLES * * $ wp core multisite-convert From 9f15055b11423dc825368ebb54cadd780624c1f3 Mon Sep 17 00:00:00 2001 From: hbhalodia Date: Mon, 22 May 2023 21:06:13 +0530 Subject: [PATCH 2/2] Feat: Add functional tests for the --skip-config param to multisite-convert command --- features/core.feature | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/features/core.feature b/features/core.feature index 19c729a3..22ac4dda 100644 --- a/features/core.feature +++ b/features/core.feature @@ -381,3 +381,12 @@ Feature: Manage WordPress installation Warning: Multisite constants could not be written to 'wp-config.php'. You may need to add them manually: """ And the return code should be 0 + + Scenario: Convert to WordPress multisite without adding multisite constants to wp-config file + Given a WP install + + When I run `wp core multisite-convert --skip-config` + Then STDOUT should contain: + """ + Addition of multisite constants to 'wp-config.php' skipped. You need to add them manually: + """