@@ -391,9 +391,9 @@ public function delete( $args, $assoc_args ) {
391391 *
392392 * [--slug=<slug>]
393393 * : Path for the new site. Subdomain on subdomain installs, directory on subdirectory installs.
394- * Required if --url is not provided.
394+ * Required if --site- url is not provided.
395395 *
396- * [--url=<url>]
396+ * [--site- url=<url>]
397397 * : Full URL for the new site. Use this to specify a custom domain instead of the auto-generated one.
398398 * For subdomain installs, this allows you to use a different base domain (e.g., 'http://site.example.com' instead of 'http://site.main.example.com').
399399 * For subdirectory installs, this allows you to use a different path.
@@ -421,11 +421,11 @@ public function delete( $args, $assoc_args ) {
421421 * Success: Site 3 created: http://www.example.com/example/
422422 *
423423 * # Create a site with a custom domain (subdomain multisite)
424- * $ wp site create --url=http://site.example.com
424+ * $ wp site create --site- url=http://site.example.com
425425 * Success: Site 4 created: http://site.example.com/
426426 *
427427 * # Create a site with a custom subdirectory (subdirectory multisite)
428- * $ wp site create --url=http://example.com/custom/path/
428+ * $ wp site create --site- url=http://example.com/custom/path/
429429 * Success: Site 5 created: http://example.com/custom/path/
430430 */
431431 public function create ( $ args , $ assoc_args ) {
@@ -435,21 +435,21 @@ public function create( $args, $assoc_args ) {
435435
436436 global $ wpdb , $ current_site ;
437437
438- // Check if either slug or url is provided
439- $ has_slug = isset ( $ assoc_args ['slug ' ] );
440- $ has_url = isset ( $ assoc_args ['url ' ] );
438+ // Check if either slug or site- url is provided
439+ $ has_slug = isset ( $ assoc_args ['slug ' ] );
440+ $ has_site_url = isset ( $ assoc_args ['site- url ' ] );
441441
442- if ( ! $ has_slug && ! $ has_url ) {
443- WP_CLI ::error ( 'Either --slug or --url must be provided. ' );
442+ if ( ! $ has_slug && ! $ has_site_url ) {
443+ WP_CLI ::error ( 'Either --slug or --site- url must be provided. ' );
444444 }
445445
446- // If URL is provided, parse it to get domain and path
446+ // If site URL is provided, parse it to get domain and path
447447 $ custom_domain = null ;
448448 $ custom_path = null ;
449449 $ base = null ;
450450
451- if ( $ has_url ) {
452- $ parsed_url = parse_url ( $ assoc_args ['url ' ] );
451+ if ( $ has_site_url ) {
452+ $ parsed_url = parse_url ( $ assoc_args ['site- url ' ] );
453453 if ( ! isset ( $ parsed_url ['host ' ] ) ) {
454454 WP_CLI ::error ( 'Invalid URL format. Please provide a valid URL (e.g., http://site.example.com). ' );
455455 }
@@ -537,7 +537,7 @@ public function create( $args, $assoc_args ) {
537537
538538 if ( is_subdomain_install () ) {
539539 if ( null !== $ custom_domain ) {
540- // Use custom domain if provided via --url
540+ // Use custom domain if provided via --site- url
541541 $ newdomain = $ custom_domain ;
542542 $ path = $ custom_path ;
543543 } else {
@@ -547,7 +547,7 @@ public function create( $args, $assoc_args ) {
547547 }
548548 } else {
549549 if ( null !== $ custom_domain ) {
550- // Use custom domain and path if provided via --url
550+ // Use custom domain and path if provided via --site- url
551551 $ newdomain = $ custom_domain ;
552552 $ path = $ custom_path ;
553553 } else {
0 commit comments