Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Capistrano receipe bits for WordPress

branch: master

This branch is 0 commits ahead and 0 commits behind master

Fetching latest commit…

Cannot retrieve the latest commit at this time

README.rdoc

wp-capistrano

Capistrano receipe for WordPress

Usage

gem install wp-capistrano
cd /path/to/wordpress/wp-content
wpcapify .
vim lib/config.yml
cap setup # once
cap deploy

Configuration options:

application.repository

The repository that contains wp-content

wordpress.repository

By default, it uses our GitHub mirror

wordpress.version

A git tree-ish, which can be a branch name, tag, or a commit hash (e.g. v3.0.1)

deploy.*

These names are used when doing cap deploy when deploying to non-default environments (i.e. cap production deploy)

deploy.*.default

Set this to true to make this the default target

deploy.*.ssh_user

The deploy user (who should have write access to path on the remote machine)

deploy.*.ssh_domain

The host where the site lives

deploy.*.path

The path on the remote machine

deploy.*.vhost

The HTTP hostname - sets WP_HOME and WP_SITEURL

deploy..database.

All the database settings (name, user, host, password)

deploy.*.modules

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

Modules

These are configured in deploy.*.modules:

plugin-install

Makes the plugin directory writable by all, and creates the upgrade directory

shared-dirs

Copies local directory to remote machine at setup time, and makes it writable by all

wp-super-cache

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

Automagic features

SASS

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

Compass

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.

htaccess

Uploads ./htaccess to .htaccess if it exists.

Fixing plugins

Some plugins require esoteric setups. We fix these automatically:

  • Cforms

Credits

Main author

Tom Adams <tom@thedextrousweb.com>

Some code

github.com/jestro/wordpress-capistrano

Copyright

Copyright © 2010 The Dextrous Web. See LICENCE for details.

Something went wrong with that request. Please try again.