Updating Development TLD from .dev to .test

If you’re still using the .dev TLD for development you need to stop. 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.

  1. vagrant up your development environment
  2. vagrant ssh into the box
  3. Navigate to the current folder cd /srv/www/example.com/current
  4. Use WP-CLI to take a backup wp db export before-tld-change.sql
  5. 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)
  6. Exit the SSH session
  7. Edit trellis/group_vars/development/wordpress_sites.yml to use your new .test TLD
  8. Run vagrant provision to re-build your development box. This will not effect your existing database or uploads.
  9. Run vagrant up again to rewrite your /etc/hosts/ with the new domain


Join the discussion on Roots Discourse

Help support our open-source development efforts

Help us grow

Join over 7,800+ subscribers on our newsletter to get the latest Roots updates, along with occasional tips on building better WordPress sites.

Looking for WordPress plugin recommendations, the newest modern WordPress projects, and general web development tips and articles?

“Easily the best WordPress email I get.” Colin OBrien

Follow us on Twitter @rootswp

Ready to checkout?