-
Notifications
You must be signed in to change notification settings - Fork 172
Multiple environments explained
Wordmove assumes one of the environments will always be your development env. So:
Never modify Movefile's first section name (local)
local:
vhost: "http://site.dev"
wordpress_path: "/Users/me/Sites/site-local"
database:
name: "wordpress"
user: "root"
password: "root"
host: "127.0.0.1"That is your local dev env and the local node is mandatory. Full stop.
Other nodes on the same level will declare remotes. Here we have 2 remotes declared: testand live
local:
vhost: "http://site.dev"
wordpress_path: "/Users/me/Sites/site-local"
database:
...
test:
vhost: "http://site.net"
wordpress_path: "/dev/www/"
database:
...
exclude:
...
ssh:
...
live:
vhost: "http://site.net"
wordpress_path: "/site/www/"
database:
...
exclude:
...
ssh:
...Note that they have same indentation level as local
When you pull/push you can specify a remote w/ -e flag if you have multiple remotes.
If you have just one remote it will be used by default, so you can omit -e flag.
When you pull, the destination will always be local; tell Wordmove the environment from where it should take the bits w/ -e. E.g.:
wordmove pull -t -e live
will sync from live to local
When you push, the destination will always be the requested remote; tell Wordmove the required destination environment w/ -e. E.g.:
wordmove push -t -e test
will sync from local to test.
When you pull a DB Wordmove will dump a copy of your local DB before overwrite it. It will be in wp-content/local-backup-TIMESTAMP.sql
When you push the DB to a remote Wordmove will save a dump of the remote's DB the same way, naming it w/ the remote's name: wp-content/live-backup-TIMESTAMP.sql and wp-content/test-backup-TIMESTAMP.sql
Thanks to @charmcat who shared her troubleshoot with us and suggested to write down this page 👍