@robertklep is correct about why your cd
doesn't persist. Each command invokes a distinct shell instance which starts in its initial state. You could prefix each command with cd /home/jansenstok/domains/alcoholtesterwinkel.com/public_html/ &&
as a quick fix, but really you are setting yourself up for pain. What you want is a shell script with all the power of multiple lines as opposed to a list of individual disconnected commands.
Look at using ssh2's sftp
function to transfer a complete shell script to the remote machine as step 1, execute it via exec
(/bin/bash /tmp/your_deploy_script.sh
) as step 2, and then delete the script as step 3.