--path (WP-CLI)

Uit De Vliegende Brigade
Naar navigatie springen Naar zoeken springen

The option --path enabled execution of WP-CLI commands without the need to change the PWD to that installation.

This would be very welcome, but so far (Sep. 2022), I didn't get it to work. E.g., none of this works:

cd ~
wp plugin status --path=/var/www/example.com
wp plugin status --path='/var/www/example.com'
wp plugin status --path='/var/www/example.com/'
wp plugin status --path="/var/www/example.com"
wp plugin status --path="/var/www/example.com/"
wp plugin status --path=`/var/www/example.com`
wp plugin status --path=`/var/www/example.com/`

pad="/var/www.example.com"; wp plugin status --path=$pad
pad="/var/www.example.com/"; wp plugin status --path=$pad
pad="/var/www.example.com"; wp plugin status --path='$pad'
pad="/var/www.example.com/"; wp plugin status --path='$pad'
pad="/var/www.example.com"; wp plugin status --path="$pad"
pad="/var/www.example.com/"; wp plugin status --path="$pad"
pad="/var/www.example.com"; wp plugin status --path=`$pad`
pad="/var/www.example.com/"; wp plugin status --path=`$pad`
pad="/var/www.example.com"; wp plugin status --path=$((pad))
pad="/var/www.example.com/"; wp plugin status --path=$((pad))

See also

Sources