rsync Notes- Push a WP Plugin
Bash, Linux, Rsync, Sysadmin, WordPress
Use rsync to push a plugin from a local development machine to a remote server.
Sync a Single WP Plugin
Trailing slash or not? That is the question…
- No trailing slash on source path: rsync will create the last directory of the path before copying content. In the case above, you’d end up with
/var/www/sitename.com/public_html/wp-content/plugins/plugin-name/*files.*
. - Append a trailing slash - rsync will only copy the contents (subdirectories and files) of the source directory directly to the target - Not the directory itself.
I’m always forgetting this - it seems counter-intuitive!
Resources
http://devblog.virtage.com/2013/01/to-trailing-slash-or-not-to-trailing-slash-to-rsync-path/ http://qdosmsq.dunbar-it.co.uk/blog/2013/02/rsync-to-slash-or-not-to-slash/
comments powered by Disqus