admin管理员组

文章数量:1287965

I have a multisite setup with some 14 woocommerce sites.

site_id | domain
1       | local.mainsite
2       | local.subsite-2
3       | local.subsite-3
4       | local.subsite-4

I want to retrieve the blogname of subsite 4 (local.subsite-4 which exists as a working site, and is also present in wp_blogs).

So, I do: wp option get blogname --url=local.subsite-4.

It returns the blogname of site 1 (local.mainsite, not the subsite set in the --url parameter).

Can anyone reproduce this or have any suggestion on what I am doing wrong here?

I'm using the latest wordpress core.

OS: Darwin 20.5.0 Darwin Kernel Version 20.5.0: Sat May  8 05:10:33 PDT 2021; root:xnu-7195.121.3~9/RELEASE_X86_64 x86_64
Shell:  /bin/zsh
PHP binary: /usr/local/Cellar/[email protected]/7.4.23/bin/php
PHP version:    7.4.23
php.ini used:   /usr/local/etc/php/7.4/php.ini
MySQL binary:   /usr/local/bin/mysql
MySQL version:  mysql  Ver 15.1 Distrib 10.6.4-MariaDB, for osx10.16 (x86_64) using readline 5.1
SQL modes:  STRICT_TRANS_TABLES,ERROR_FOR_DIVISION_BY_ZERO,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION
WP-CLI root dir:    phar://wp-cli.phar/vendor/wp-cli/wp-cli
WP-CLI vendor dir:  phar://wp-cli.phar/vendor
WP_CLI phar path:   /Users/jurgen/Sites/local.gasveerwinkel.nl/www
WP-CLI packages dir:    /Users/jurgen/.wp-cli/packages/
WP-CLI global config:
WP-CLI project config:
WP-CLI version: 2.5.0

本文标签: multisitewp option get blogname urlmysubsitecom returning main site option