W
W
WebforSelf2021-08-16 12:54:17
Command line
WebforSelf, 2021-08-16 12:54:17

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>


Under what user is it correct to log in and already work with wp cli?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
E
Evgeny Fadeev, 2021-08-25
@WebforSelf

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 question

Ask a Question

731 491 924 answers to any question