I have a multisite setup with some 14 woocommerce sites.
site_id | domain
1 | local.mainsite.com
2 | local.subsite-2.com
3 | local.subsite-3.com
4 | local.subsite-4.com
I want to retrieve the blogname of subsite 4 (local.subsite-4.com which exists as a working site, and is also present in wp_blogs).
So, I do: wp option get blogname --url=local.subsite-4.com
.
It returns the blogname of site 1 (local.mainsite.com, 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
globname
beblogname
? I could not reproduce this locally--url
value.. like--url=local.subste-4.com
(note it's missing the letter "i")? And I actually reproduced the issue by deliberately using a non-existent site. Have you tried using a full URL likehttp://local.subsite-4.com
?wp site list
. I've tried the full url, also the domain without protocol, but with no effect