I use WordMove to mirror local Wordpress installations and DB data back and forth from my Local development machine to the remote server.
Here’s a sample setup:
- ssh into your site (right click site name, and select Open SSH)
cd /app/public
- Edit wp-config.php and make sure it has the same table prefix as the remote site, don’t change anything else.
- Install WordMove:
gem install wordmove
- Create the Movefile by doing:
wordmove init
- Edit the Movefile and add Production (and maybe more environmentes)
- Pull the remote site, including database and media doing:
wordmove pull -all
Here’s a sample Movefile:
local:
vhost: "http://soderlind.dev"
wordpress_path: "/app/public" # use an absolute path here
database:
name: "local"
user: "root"
password: "root"
host: "localhost"
production:
vhost: "https://soderlind.no"
wordpress_path: "/ABSOULUTE/PATH/TO/WORDPRESS" # use an absolute path here
database:
name: "wp"
user: "wp"
password: "PASSWORD"
host: "localhost"
exclude:
- ".git/"
- ".gitignore"
- ".sass-cache/"
- "node_modules/"
- "bin/"
- "tmp/*"
- "Gemfile*"
- "Movefile"
- "wp-config.php"
- "wp-content/*.sql"
ssh:
host: "SSHHOST"
user: "SSHUSER"