I am trying to export a remote wp db using the following:
source_gzip_db=git-dumps/export.sql.gz
source_path_to_wordpress=/home/username/public_html
source_ssh_host="123.456.789.12"
source_ssh_user="username"
connecting_keyfile="/home/username/.ssh/id_rsa"
ssh -p22 -i $connecting_keyfile $source_ssh_user@$source_ssh_host 'cd public_html && bash' << EOF
php wp-cli.phar db export --exclude_tables=wp_,wp_, --path=$source_path_to_wordpress - | gzip > $source_path_to_wordpress$source_gzip_db
EOF
where $source_path_to_wordpress
is /home/username/public_html
But I keep getting the following error:
Error: This does not seem to be a WordPress installation.
Pass --path=`path/to/wordpress` or run `wp core download`.
Any tips?