WP cli 使用 –allow-root 允许你用 root 用户执行wp 命令

遇到了一下的错误

wp core download
Error: YIKES! It looks like you're running this as root. You probably meant to r                                un this as the user that your WordPress installation exists under.

If you REALLY mean to run this as root, we won't stop you, but just bear in mind                                 that any code on this site will then have full control of your server, making i                                t quite DANGEROUS.

If you'd like to continue as root, please run this again, adding this flag:  --a                                llow-root

If you'd like to run it as the user that this site is under, you can run the fol                                lowing to become the respective user:

    sudo -u USER -i -- wp <command>

如果你是 root 用户

/wp core download --allow-root

执行命令带上 `–allow-root`

发表回复

您的邮箱地址不会被公开。 必填项已用 * 标注