There are many ways to do sync up the local development machine with the staging/live server.
For example: using git and rsync. In this post, though, I am going to write about how to do it with wp-cli.

Do follow the instructions how to set it up on your system. If you haven't already.
https://github.com/wp-cli/wp-cli/wiki

Here is a simple process that you can use to deploy plugin(s). It should be pretty similar with themes.

Steps

  1. Test your plugin to make sure it doesn't crash.
  2. Create a zip archive (e.g. using 7zip) that contains plugin's folder and add the zip file to your Dropbox.
  3.  Copy the download link
    Note: Do make sure that your Dropbox link contains ?dl=1 (or Copy.com contains ?download=1) so the file is indeed offered for download.
  4. Add the link(s) to this script below in the $plugin_urls array.
  5. Change the password by editing the $pwd variable.
  6. Upload the zzz_sync.php where WordPress is
  7. Access the zzz_sync.php file from the browser using the password you specified.
  8. IMPORTANT NOTE:
    the wp-cli command line below instructs wp-cli to delete any previous versions of the plugin so be careful.

Usage:
http://yoursite.com/zzz_sync.php?sync_pwd=qsandbox

Disclaimer: The content in this post is for educational purposes only. Always remember to take a backup before doing any of the suggested steps just to be on the safe side.
Referral Note: When you purchase through a referral link (if any) on this page, we may earn a commission.
If you're feeling thankful, you can buy me a coffee or a beer