Skip to content

Instantly share code, notes, and snippets.

@otobrglez
Last active October 19, 2017 13:23
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save otobrglez/bb317b71ccb6cd2cdedd0e5f6dc50314 to your computer and use it in GitHub Desktop.
Save otobrglez/bb317b71ccb6cd2cdedd0e5f6dc50314 to your computer and use it in GitHub Desktop.
Bash script for syncing WordPress theme to FlyWheel (sftp with lftp)
#!/usr/bin/env bash
# Oto Brglez - <otobrglez@gmail.com>
set -e
# Set path where your theme lives on server.
THEME_DIRECTORY=/org-myorg/site/wp-content/themes/some-theme
lftp -u $FLYWHEEL_USER,$FLYWHEEL_PASS sftp://sftp.flywheelsites.com << --EOF--
set sftp:auto-confirm yes
set ssl:verify-certificate false
cd $THEME_DIRECTORY
mirror --exclude sync.sh --exclude .git/ -R
quit
--EOF--
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment