So I've been trying to set up Wp-Deploy for about 3 weeks now :(
I have a digitalocean droplet that I am using for staging and was able to finally get my local environment to deploy the files to the server, however, I cannot get the database commands to work. When I try and backup the database I get the following output
dixon@Sphinx /var/www/html $ bundle exec cap staging db:backup 00:00 db:backup_name 01 mkdir -p /var/www/vhosts/thedixonbuilds.com/httpdocs/shared/db_backups ✔ 01 root@<ip address> 1.748s 02 wp db export - | gzip > /var/www/vhosts/thedixonbuilds.com/httpdocs/shared/db_backups/20190210165609.sql.gz 02 /usr/bin/env: 02 ‘wp’ 02 : No such file or directory 02 ✔ 02 root@<ip address> 0.244s Downloading db_backups/20190210165609.sql.gz 100.0% 03 rm /var/www/vhosts/thedixonbuilds.com/httpdocs/shared/db_backups/20190210165609.sql.gz ✔ 03 root@<ip address> 0.228s
and when I try and run the db:push
00:00 db:backup_name 01 mkdir -p /var/www/vhosts/thedixonbuilds.com/httpdocs/shared/db_backups ✔ 01 root@<ip address> 1.399s 02 mkdir -p db_backups ✔ 02 dixon@localhost 0.003s 03 wp db export - | gzip > db_backups/20190210170146.sql.gz ✔ 03 dixon@localhost 0.271s Uploading db_backups/20190210170146.sql.gz 100.0% 04 gzip -c -d /var/www/vhosts/thedixonbuilds.com/httpdocs/shared/db_backups/20190210170146.sql.gz | wp db import - 04 bash: wp: command not found (Backtrace restricted to imported tasks) cap aborted! SSHKit::Runner::ExecuteError: Exception while executing as [email protected]: gzip exit status: 127 gzip stdout: Nothing written gzip stderr: bash: wp: command not found Caused by: SSHKit::Command::Failed: gzip exit status: 127 gzip stdout: Nothing written gzip stderr: bash: wp: command not found /var/www/html/lib/capistrano/tasks/db.rake:148:in `block (4 levels) in <top (required)>' /var/www/html/lib/capistrano/tasks/db.rake:147:in `block (3 levels) in <top (required)>' Tasks: TOP => db:push (See full trace by running task with --trace)
I'm not sure how capistrano achieves the database manipulation or what usr/bin/env is supposed to contain. Can anyone help me with some leads?
Thanks!