I'm trying to use wp-cli/restful with aliases where I can specify the domain using http: domain in my ~/.wp-cli/config.yml and it doesn't appear to work, like wp-cli is ignoring the http key in the configuration if it's in an alias.
Create ~/wp-cli.config.yml with just the following:
--
@test-http:
http: wordpress.com
@test-ssh:
ssh: nonexistent.google.com
Then, try the following:
$ wp --http=wordpress.com rest status list
Error: Couldn't auto-discover WP REST API endpoint from wordpress.com.
$ wp @test-http rest status list
Warning: No WordPress install found. If the command 'rest status list' is in a plugin or theme, pass --path=`path/to/wordpress`.
Error: 'rest' is not a registered wp command. See 'wp help' for available commands.
Did you mean 'post'?
$ wp @test-ssh rest status list
Error: Cannot connect over SSH using provided configuration.
I would have expected the wp @test-http rest status list to return the same output as wp --http=wordpress.com rest status list, but instead it behaves as though http isn't set.
I'm trying to use
wp-cli/restfulwith aliases where I can specify the domain usinghttp: domainin my~/.wp-cli/config.ymland it doesn't appear to work, likewp-cliis ignoring thehttpkey in the configuration if it's in an alias.Create
~/wp-cli.config.ymlwith just the following:Then, try the following:
I would have expected the
wp @test-http rest status listto return the same output aswp --http=wordpress.com rest status list, but instead it behaves as thoughhttpisn't set.