By this point in the migration process you will have the database imported, the wp-content uploaded, and the domain settings configured in the client portal and WordPress. You are now ready to emulate what the website will look like as if you had made the DNS change. There is a file on your computer called ‘hosts’ which allows you to override DNS. We’re going to edit the ‘hosts’ file to fake out the DNS on your computer.
Note: If you are following along on the Migration Checklist in the User Portal, this step is a little different. In the Verify Phase, you can with one click preview your site.
LOCATE IP ADDRESS:
In order to point your domain to WP Engine on your local machine, you will need to know your WP Engine IP address. If you don’t know your IP address, follow the steps in the document, “How to Find Your IP Address?” You can also simply ping [yourwebsitename].wpengine.com to find your IP. If you don’t know how to ping, you may use this website service to find your IP: Site24x7
EDIT HOSTS FILE:
The main idea is that you will edit the hosts file to point your domain name to your WP Engine IP. You will add a new line in the hosts file with the format of “ip-address domain.com.” So for example, if your IP is 10.10.10.1 and your domain is wpengine.com, then you will add the following line into the hosts file:
The steps to editing the hosts file will vary depending on whether you run a PC or a Mac, and also on the version of your operating system. Because of the variations and since there is already good documentation on how to edit the hosts file, we’ve compiled a set of external resources, one of which will fit your particular operating system.
On a Mac, there is a very helpful tool called Gas Mask. It allows you to easily edit the hosts file. You can download it here.
Depending on the operating system you use, you will need to flush your DNS.
In order for the hosts file settings to take into effect, please restart the browser. You can now access your website hosted by WP Engine using the domain name.