Capistrano receipe for WordPress
gem install wp-capistrano cd /path/to/wordpress/wp-content wpcapify . vim lib/config.yml cap setup # once cap deploy
The repository that contains wp-content
By default, it uses our GitHub mirror
A git tree-ish, which can be a branch name, tag, or a commit hash (e.g. v3.0.1)
These names are used when doing cap deploy when deploying to non-default environments (i.e. cap production deploy)
Set this to true to make this the default target
The deploy user (who should have write access to path on the remote machine)
The host where the site lives
The path on the remote machine
The HTTP hostname - sets WP_HOME and WP_SITEURL
All the database settings (name, user, host, password)
A list of modules that should be enabled
Before you run cap setup or cap deploy, you should ensure the path on the remote machine exists and is chmodded such that the deploy user can write to it.
To deploy to production rather than staging, for instance:
cap production deploy
These are configured in deploy.*.modules:
Makes the plugin directory writable by all, and creates the upgrade directory
Copies local directory to remote machine at setup time, and makes it writable by all
Sets up WP Super Cache, including wp-config, and setting up the appropriate cache directories
Note: Some modules are set with a string, others are set with a hash. For instance:
- modules: - plugin-install - shared-dirs: - plugins - uploads - wp-super-cache
If there exists wp-content/themes///sass_output.php it will be executed locally and its contents will be uploaded as sass_output.css. Then style.css will be sedded to s/.php/.css/.
A sample sass_output.php can be found in wp-generate ( github.com/dxw/wp-generate ).
If there's a compass config file in the theme, it will be found and compiled locally, and the stylesheets directory will be uploaded to the correct place.
Uploads ./htaccess to .htaccess if it exists.
Some plugins require esoteric setups. We fix these automatically:
- Main author
Tom Adams <firstname.lastname@example.org>
- Some code
Copyright © 2010 The Dextrous Web. See LICENCE for details.