4 ms·
Using Rake and Rsync for WordPress deployment
- smanek 17y agoThanks, I'm currently messing with converting my (Common Lisp) webapp's CSS to SASS. This suggested it was time for me to use something a little beyond my ad-hoc conglomeration of Bash scripts I'm currently using. I was actually just investigating Capistrano - but this seems so easy ...
- thwarted 17y agoThis sure is long for running three, serially executed commands. What am I missing here? A Makefile, which is a dependency resolution DSL from before the term DSL was popular, for this is only like 6 lines, and is much terser and explicit.
- adamstac 17y ago@thwarted It's 21 lines and simple to use. 'rake deploy' is much better than what most WordPress users are doing to deploy an update to their theme. What's the alternative? FTP? Typing the rsync command by hand each time? This also assumes that you are using Sass (http://sass-lang.com/ http://sass-lang.com/) and Compass (http://compass-style.org/ http://compass-style.org/). If you want the scoop on using Sass and Compass with WordPress check out the Compass-WordPress extension at GitHub: http://github.com/pengwynn/compass-wordpress http://github.com/pengwynn/compass-wordpress @smanek Capistrano is WAAAY over-kill. rsync is a better fit and --delete ensures that you delete files that don't exist on the sending side. Keeps it simple and clean.
- westi 17y agoWhy not just use your favourite revision control system, e.g. svn, and push changes out using that? That way you can go back in time and having a staging server if the project requires it.
- adamstac 17y agoLocally I version control the theme using git so the files are being versioned. I choose to deploy using rsync to keep things simple.
- adamstac 17y agoI'm working on a Thor (http://github.com/wycats/thor http://github.com/wycats/thor) version of this as well, because I ran into the need to pass options to a task. Plus, Thor is basically writing a Ruby class.