If this has already been covered elsewhere I haven’t seen it. And while it’s probably fairly obvious this might be useful to have written up … for someone.
If you’re still using the .dev TLD for development you need to stop. And if your old sites still use it you need to update them. Especially in instances where you’re not using self-signed certificates for development.
-
vagrant up
your development environment -
vagrant ssh
into the box - Navigate to the current folder
cd /srv/www/example.com/current
- Use WP-CLI to take a backup
wp db export before-tld-change.sql
- And use it to do the search/replace of the DB
wp search-replace //example.dev //example.test
(add--dry-run
if you want to test it first) - Exit the SSH session
- Edit
trellis/group_vars/development/wordpress_sites.yml
to use your new.test
TLD - Run
vagrant provision
to re-build your development box. This will not effect your existing database or uploads.
Done!