-
Notifications
You must be signed in to change notification settings - Fork 2
Environment Management
"environments": {
"local" : { ... }
"staging" : { ... }
"production" : { ... }
}Default: none
The environments setting contains objects within it defining each environment. Currently, each environment should match a branch of the repository.
There are several other environment-related settings that exist outside of the "environments" object:
"db_master": "development"Default: none
The environment whose uploads and database should be treated as master. This value gets used for shorthand migration tasks in which the environment is not explicitly stated.
"uploads_sync": "copy"Default: none
The method of uploading/downloading WP uploads
"copy": Use each environments' "migrate_uploads_method" to move files up and down.
"rewrite": Inserts a rewrite rule in WP's .htaccess file to rewrite all requests to the local uploads folder to "db_master"'s uploads directory
"alias_local_env": "production"Default: none
This setting is useful on build servers in which the local environment is one of the shared environments (i.e. "development" or "production"). Upon running HelperPress, all settings inside of this specified environment are copied into the "local" environment configuration. Note that any defined properties within the "local" environment will override those in the aliased environment.
Each individual environment should be defined within the "environments" setting.
The following settings should go within an individual environment definition.
"title": "Client Dev Server"required
A human-readable title that gets logged sometimes.
"ssh": {
"host": "dev01.40digits.net",
"port": 22,
"user": "kewld00d69"
"pass": "password1234"
"keyfile": "~/.ssh/customkey.rsa"
"passphrase": "myKeysPassphrase"
}required
SSH information used for any rsync or sftp tasks. All fields besides "host" are optional. Omitted properties will (should) be inferred by the software. If not, please report a bug.
"db": {
"host": "127.0.0.1",
"pass": "password",
"user": "db-user"
"database": "my-wp"
}required
These credentials are used in the generated wp-config.php file as well as in database operations that take place over SSH. Therefore the host address should be relative to the server.
"wp_path": "/var/www/my-wp-install"required
The absolute path to your WordPress root folder. This value is used for the Search & Replace functionality as well as SSH tasks that reference the install directory.
"ftp_wp_path": "public_html"Default: value of "wp_path"
The base directory of your FTP or SFTP user. In other words, it's what your FTP editor considers to be "/". This value is used in FTP tasks. If your public html folder is the root of your FTP user's directory (i.e. you are dumped into the public folder upon logging in via FTP), use "." as this value.
"home_url": "my-project.staging.ourcompany.net"required
The home URL of your WP site. It is used to determine how to access the HelperPress WP Plugin as well as in the database migration search and replace.
"deploy_method": "rsync"The method HelperPress should use when running the deploy task.
"rsync": Use rsync over SSH to deploy WP core, plugins, and the theme.
"wpe": Clone the current repository from WPEngine, copy build files on top of it, commit the differences, and push. Note that this method required "remote" to be defined (see below.)
"none": Prevent deploy task from running.
"remote": "git@git.wpengine.com:production/sitename.git"optional, unless "deploy_method" is set to "wpe"
The remote repository tracked by WPEngine.
"migrate_uploads_method": "rsync"Default: "none"
How HelperPress should migrate uploads to and from this environment.
"rsync": Use rsync over SSH.
"sftp": Copy every file every time over SFTP.
"none": Prevent migrate_uploads task from running.
"migrate_db_method": "ssh"Default: "none"
How HelperPress should migrate the database to and from this environment.
"ssh": Use mysqldump over SSH.
"plugin": Use a combination of SFTP and WP Plugin to move data.
"none": Prevent migrate_db task from running.
"hp_wp_api_key": "260e31ca38cfaa782666d16293ff9a9845e3a9271666"Default: none
This is the API key used to communicate with teh WordPress plugin. It gets set automatically via SFTP, so you should never need to set/unset this.