When preparing a site for launch, it can often be useful to test the site on the Flywheel server and live domain prior to making any DNS changes. This is possible by editing your hosts file. Editing your hosts file allows you to point a domain to a specific IP address on your personal computer only. In particular, this method is often used when testing large multisites, as it’s far less error prone than swapping to temporary domains throughout your entire database.
All operating systems have a way to accomplish this task, but the process and syntax is slightly different in each OS. You can find instructions below for specific operating systems.
When you’ve located your hosts file, you’ll need to add at least two pieces of information: the IP address you want the site to resolve to and the domain. For example, adding the below two lines will point www.domain.com and domain.com to the IP address 184.108.40.206. You’ll obviously want to add your live site’s domain name, and the IP address of your new Flywheel server. These entries are separated in your hosts file only by a single space.
|Flywheel IP Address||Your domain name|
Once you’ve modified your hosts file, you’ll need to prepare your Flywheel site to work with the domain you added to your hosts file. You can learn about setting your Primary domain name here. Make sure you add the domain exactly as you added it to your hosts file previously – they should match.
Once you’ve added the proper domain and IP information as noted above, you can save the file and visit the domain in your browser. It should now load like normal, but from the Flywheel server – not your current host. Once you’ve completed your testing, you should remove these modifications from your hosts file.
You can find direct instructions on how to modify your hosts file on various popular operating systems at this link.
The most commonly asked questions, and a few we just think you should know.24 Articles
Questions that don't fit elsewhere, or those about Flywheel in general.55 Articles
Everything you need to know to get your first Flywheel site up and running.8 Articles
Details about how to manage DNS and point your domain names at Flywheel.11 Articles
Questions relating to payments, billing and managing your account on Flywheel.12 Articles
Learn everything there is to know about what Blueprints are, how to create them and how to make the best use of them.5 Articles
How to access your WordPress database to make changes and update content.3 Articles
Everything you need to know about our amazing, free local WordPress development software for Mac and PC.5 Articles
Everything you need to know about managing your team with our Organizations feature.8 Articles
Which plugins work best, which plugins work worst, and everything in between.7 Articles
Details about everything Flywheel does to makes your site so secure.12 Articles
Information on setting up and troubleshooting with SFTP connections and file transfers.4 Articles
All there is to know about our free, automatically installed and activated SSL certificates.8 Articles
How to get the most out of Staging, which allows you to duplicate a site, make changes, and then push those changes to the live site.6 Articles
Everything you need to know about our Whitelabel subscriptions for branding and reselling Flywheel.4 Articles
Here's a free ebook!