Sync a live site using just the vvv-custom.yml
file
Make sure your local machine has a key setup that can be used to access the server you would like to replicate.
my-site:
repo: [email protected]:Relative-Marketing/relative-site-template.git
hosts:
- my-site.test
custom:
ssh_host: A valid ssh host
ssh_user: A valid ssh user (that is associated with the key on your local machine)
custom:
# A comma seperated list of files/folders to exclude from file sync - default=false
backup_excludes: 'wp-content/some-dir,*.tar,*.zip'
# Use a custom name for the database backup - default='vvv-db-backup.sql'
db_backup_name: 'my-custom-sql-backup-name.sql'
# The ssh port to use - default=2020
ssh_port: 22
# The remote path of your wordpress install - default='public_html'
wp_path: "htdocs"
# If you just want to provision files or db - allowed options 'all', 'db', 'files' - default='all'
provision_type: db
If you provision a site that has wordfence installed your initial provision may not work. To resolve the issue loading your newly provisioned site you need to delete the references to wordfence mentioned here
vagrant ssh
cd /path/to/site
wp plugin deactivate wordfence
rm -rf /path/to/site/public_html/.user.ini
Repeat step 1 but change the wp command to activate
wp plugin activate wordfence
This usually means that your site has php errors (which could be caused by php setting differences). For example you may have a plugin installed that opens a php tag like this:
<?
some servers will allow this but vvv by default does not, so you need to look through the provision log to assess what errors are being produced. Once you have identified the errors you should resolve them on your local machine (and on your live site to prevent this issue happening again) then reprovision.