Fabric configuration for development with WordPress locally and on one remote server
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Type Name Latest commit message Commit time
Failed to load latest commit information.


Wordpress fabfile

Deploy Wordpress from local dev to one remote host (staging or production)

Use two servers, one for local development and one remote for staging or production, keep them in sync both ways during development


  • use some remote code hosting (anything usable by git remote)
  • push code from dev to staging or back (e.g. plugin updates) using your code hosting as the central source repo
  • migrate database from dev to staging or back
  • URLs in wordpress' database are changed automatically
  • directly sync wp-content/uploads using unison


  • push your code to some code hosting site, e.g. bitbucket
  • check it out locally and on your remote server
  • copy config-dist.py to config.py
  • edit config.py and fill in your details
  • you set GIT_REMOTE_NAME to some value; you'll have to create this remote location in both your code checkouts using "git remote add"
  • edit wp_migrate_to_*.sql and insert urls


  • sync_uploads syncs your upload directory using unison
  • dump_local_database and dump_remote_database backup databases
  • push_local_code push local code to remote server
  • push_local_database overwrite host database with local one
  • pull_remote_code pull remote code to local repo
  • pull_remote_database overwrite local database with remote one