Skip to content

Instantly share code, notes, and snippets.

@gerrgg
Created June 1, 2020 14:37
Show Gist options
  • Save gerrgg/7ef50d8e4563e430ef0b866ec192fb4a to your computer and use it in GitHub Desktop.
Save gerrgg/7ef50d8e4563e430ef0b866ec192fb4a to your computer and use it in GitHub Desktop.
How to copy uploads from remote server to local directory for wordpress.
rsync -v -a -e 'ssh -p 2200' [email protected]:home/wp-content/uploads/ uploads/
// Keep in mind that rsync works left to right (from => target).
// -v verbose lets you know things are happening
// -a archive maintains preserves directory structure
// -e executes a piece of code ( I use it to target a specific port for ssh ).
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment