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.
Here is a simple process that you can use to deploy plugin(s). It should be pretty similar with themes.
- Test your plugin to make sure it doesn't crash.
- Create a zip archive (e.g. using 7zip) that contains plugin's folder and add the zip file to your Dropbox.
- 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.
- Add the link(s) to this script below in the $plugin_urls array.
- Change the password by editing the $pwd variable.
- Upload the zzz_sync.php where WordPress is
- Access the zzz_sync.php file from the browser using the password you specified.
- IMPORTANT NOTE:
the wp-cli command line below instructs wp-cli to delete any previous versions of the plugin so be careful.