wordpress - wp-deploy environment setup: wp stderr: /usr/bin/env: wp: No such file or directory -


i'm following instructions here setup wordpress remote staging server. when run command: bundle exec cap staging wp:setup:remote runs fine while until reaches step:

info [27763386] running /usr/bin/env wp core install --url='[server]' --title='[title]' --admin_user='[username]' --admin_password='[password]' --admin_email='[email]' root@[server]

this gives me error

(backtrace restricted imported tasks) cap aborted! sshkit::runner::executeerror: exception while executing root@[server]: wp exit status: 127 wp stdout: nothing written wp stderr: /usr/bin/env: wp: no such file or directory

does know problem here? i've followed instructions wp-deploy github , can't figure out problem is.

you logging on staging machine root. try use user. if want setup wp under root user, should edit lib/capistrano/tasks/wp.cap , add --allow--root in install command.

it should this:

execute :wp, "--allow-root core install --url='#{wp_siteurl}' --title='#{title}' --admin_user='#{user}' --admin_password='#{password}' --admin_email='#{email}'"

warning: running wordpress under root user terrible idea. :)

p.s. check if have wp-cli on staging server.


Comments