Vvv: How to switch from .dev to .local?

Created on 15 Dec 2017  路  8Comments  路  Source: Varying-Vagrant-Vagrants/VVV

Chrome 58 update blocks .dev under TLD. Is there a clean, easy way to switch to .local without overwriting / killing / breaking our 50+ websites and databases? I'm unsure how, so specifics would be so helpful.

I understand it's possible but I have no clue how.

Thank you in advance for helping out, I'm extremely appreciative.

support

Most helpful comment

Hi all, hi @tomjn

Just a message to confirm that pulling last master version, reprovisioning and replacing local.wordpress.dev to local.wordpress.test made the job.

Just ran this update.sh script to update VVV

echo "==> script: Update this build environment to last version and update VVV"
git pull && git submodule foreach git pull origin master

echo "==> script: Provision and start the VM"
cd vagrant
vagrant box update
vagrant up --provision
cd ..

Then, just replace the domain in your DB using your favorite tools.

Thx a lot.

All 8 comments

First, you don't want to switch to .local, because it has conflicts with zeroconf and bonjour, e.g. for test.local, do we load the VVV site test.local, or the iMac with the name test on the same network? Similarly, .localhost is also protected by an RFC, but forces you to use the loopback, making it less useful.

Instead, switch to .test. It's protected by an RFC, and you can do anything you want with it.

In the meantime, add the .test version of the domains to your sites hosts section under vvv-custom.yml ( or vvv-hosts if you've done it that way ), make sure any custom prpvisioners are setup to use .test when they create/setup new installs, and use WP CLI to search replace .dev to .test.

Sadly, there is no foolproof way to migrate TLD's, as some plugins do stupendously stupid things, e.g. hashing full URLs, breaking things once the domain changes.

Are there any plans to incorporate .test into VVV itself?

@JulieKuehl VVV moved to .test months ago if you're using the develop branch, and in 2.1 if you're using the master branch. Update VVV and visit http://vvv.test. There's an extremely high chance your own copy already supports it.

As for individual sites, see above. New installs get default sites at local.wordpress.test etc. We can't auto-convert existing sites as we can't guarantee it will work

@brograhamer aside from the config, conversion should be a standard WP domain name change, all the steps are exactly the same. But if that doesn't work for you, the docs site was updated with a guide. For that reason I'm closing this out

arghhh big migration job now that has to be done quickly via firefox before that locks me out of my dev sites as well.... im grumpy because the only clean way i know to change the url is to use my duplicator plugin. Why was it so important that they had to break things without taking the time to give us a migration path.

The real question here is can we augment these sites with some kind of ssl certificate and meet Chrome's new requirement? Does anyone wiser have an answer? I'm using these tools because I don't have time to be an expert in every area. I like learning but right now I have a deadline before xmas and a new big job to be done for no real reason.

@rtpHarry you can, but you'd have to set up your own certificate authority, add it to your keychain/trust it in your browser, generate certificates for each site, modify the nginx configs of each site to use said certificate, re-provision VVV, then hopefully chrome will accept it. There may be additional steps required too.

There are also hacky ways to get around the issue with Chrome, but they aren't guaranteed to stay the same ( e.g. you used to be able to type dangerous into the tab, but they moved to a new word ). Also keep in mind that there may be other restrictions in place, so I don't know that this will actually resolve the problem, coupled with the lack of docs on the matter

Why was it so important that they had to break things without taking the time to give us a migration path.

Because we were never meant to use that domain to begin with, so it serves us right, even if it causes everybody headaches. In hindsight I wish I'd plastered it all over the dashboard a bit more than I did

im grumpy because the only clean way i know to change the url is to use my duplicator plugin

You should be able to use the WP CLI command built into VVV as indicated in the docs

thank you for the extra information. While I was looking into it I did see people posting warnings not to use .dev going back to 2015. I was grumpy earlier as I had to get stuff done. I'm still not convinced that Google needed to hardcode this into their browser... and if they did then they should have done a multi staged warning notice like they are doing with the https login form notifications. But we are a long way from this being relevant to the original ticket now and there is probably some technical reason for all this so I will stop there :)

Hi all, hi @tomjn

Just a message to confirm that pulling last master version, reprovisioning and replacing local.wordpress.dev to local.wordpress.test made the job.

Just ran this update.sh script to update VVV

echo "==> script: Update this build environment to last version and update VVV"
git pull && git submodule foreach git pull origin master

echo "==> script: Provision and start the VM"
cd vagrant
vagrant box update
vagrant up --provision
cd ..

Then, just replace the domain in your DB using your favorite tools.

Thx a lot.

This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

Was this page helpful?
0 / 5 - 0 ratings