In this article you will learn how to use the sail download
command to keep
your local copy in sync with production.
Sometimes files will change in production, and not only when you add a new image to your media library, but also during a plugin installation, a WordPress core update and other things.
The download
command allows you to pull changes back from your production
server to your local working copy:
sail download
By default only application files will be downloaded. If you wish to download
all your media uploads as well, use the --with-uploads
flag.
If you're not sure about the state of your production server or the local
working copy, you can use the --dry-run
flag to skip downloading any files,
and only list which files have been changed, added or deleted in production.
It is recommended to use the download
command after a successful rollback,
or backup restore too, among other things that change files
on your production server.
If you're having trouble with your local working copy, backups or restores, please refer to the getting help section.