--allow-root always needed when using wp-cli

To make wp-cli more usable, if not changing default user to kinsta, it can be to add .bash_aliases script to /root

Since .bashrc already includes this file, it is just a one-liner to avoid using --allow-root every time the wp-cli command is executed.

.bash_aliases script
alias wp="/usr/local/bin/wp --allow-root"

1 Like