Like most web developers. I prefer to save time by automating low level, mundane tasks.
Laziness is a trait of a good developer.
When I started to use Wordpress again, I WAS NOT excited about using the FTP protocol to ship off changes to my theme. I wanted a simple and easy use process to deploy updates to my theme and also automate a few processes that I needed to support as part of using Sass and Compass to create my CSS styles.
What’s the alternative? FTP? Nope. Typing the rsync command by hand each time? Nope again.
This is a simple Rakefile I wrote that helps me to do all this in simple and concise manner.
Features:
- Clear and generate tasks that clear and generate new styles (via Compass)
- Deploy task that clears the styles, generates new styles and finally deploys the theme using Rsync
It’s 21 lines and simple to use. Besides, $ rake deploy is much better than what most WordPress users are doing to deploy updates to their theme. Capistrano could work too, but IMO would be over-kill. Rsync is a much better fit, and using the --delete option ensures that you delete files that don’t exist on the sending side. Keeps it simple and clean.
This Rakefile is a bit opinionated and assumes you’re using Sass and Compass. You could fork and update this Gist to suit your own setup, but if you want the scoop on using Sass and Compass with WordPress check out the Compass-WordPress extension on GitHub.



