Answer the question
In order to leave comments, you need to log in
Under what user to work in wp cli in the console?
I installed wp cli on my server, I want to work with the commands and feel at the same time.
On the server, of course, I'm sitting as a root user.
When I try to execute any of the wp cli commands, I swear
Error: YIKES! It looks like you're running this as root. You probably meant to run 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 it quite DANGEROUS.
If you'd like to continue as root, please run this again, adding this flag: --allow-root
If you'd like to run it as the user that this site is under, you can run the following to become the respective user:
sudo -u USER -i -- wp <command>
Answer the question
In order to leave comments, you need to log in
Create a user, give the necessary rights, work under it.
Don't be afraid under root - "adding this flag: --allow-root"
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question