Skip to content

Instantly share code, notes, and snippets.

@monnoval
Last active September 13, 2019 06:11
Show Gist options
  • Save monnoval/a7d8650a21534f996e434b5ca88f6822 to your computer and use it in GitHub Desktop.
Save monnoval/a7d8650a21534f996e434b5ca88f6822 to your computer and use it in GitHub Desktop.
#!/usr/bin/env bash
LOCAL=/Users/you/your/build-prod
REMOTE=/wp-content/themes/your-theme
WPE_HOST=sample.sftp.wpengine.com
WPE_USERNAME=sample-uname
WPE_PASSWORD=sample-pw
LFTP_CO="connect sftp://$WPE_USERNAME:$WPE_PASSWORD@$WPE_HOST:2222"
lftp << EOF
set sftp:auto-confirm yes
$LFTP_CO
mirror --reverse --delete \
--exclude .git/ \
--exclude gulp/ \
--exclude node_modules/ \
--exclude build-dev/ \
--exclude build-prod/ \
--exclude bower/ \
--verbose --use-pget-n=8 -c $LOCAL $REMOTE
EOF
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment