--path (WP-CLI)

Uit De Vliegende Brigade
Versie door Jeroen Strompf (overleg | bijdragen) op 28 sep 2022 om 11:11 (Nieuwe pagina aangemaakt met 'The option </code>--path</code> enabled execution of WP-CLI commands without the need to change the ''PWD'' to that installation. This would be very welcome, but...')
(wijz) ← Oudere versie | Huidige versie (wijz) | Nieuwere versie → (wijz)
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