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
- 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.
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