The hosts file is used by your computer to map locally IP address to domain names, thus overriding external DNS lookup. It resides in different places, depending on your operating system, but its format is the same throughout.
It is useful when you want to test a migrated website before you change your DNS entries, or go live with SSL-enabled.
You need to add an entry to your hosts file that looks like the following: (replace the values with your Pressidium IP, and domain name):
123.123.123.123 www.domain.com domain.com
Your computer will use this IP to connect to your WordPress site without DNS.
The following sections provide instructions for locating and editing the hosts file on several operating systems.
Windows 10, Windows 8, Windows 7, and Windows Vista
Windows NT, Windows 2000, and Windows XP
Linux
Note: Don't forget to remove the entry, once testing is finished.
Windows 10, Windows 8, Windows 7, and Windows Vista
Windows 10 / 8, Windows 7, and Windows Vista use User Account Control (UAC), so Notepad must be run as Administrator.
Windows 10 / Windows 8
Press the Windows key.
Type Notepad in the search field.
In the search results, right-click Notepad and select Run as administrator.
Click Yes if prompted with a "Do you want to allow this app to make changes to your device" dialog.
In Notepad, open the following file:
c:\Windows\System32\Drivers\etc\hosts
. You may need to select "All Files (*.*)" on the Open Dialog to be able to select the hosts file.The file already contains some lines, add your line in the end of the file in a new line.
Click File > Save to save your changes.
Windows 7 and Vista
Click Start > All Programs > Accessories.
Right-click Notepad and select Run as administrator.
Click Continue on the Windows needs your permission UAC window.
When Notepad opens, click File > Open.
In the File name field, type
C:\Windows\System32\Drivers\etc\hosts
.Click Open.
If the hosts file contains entries, add yours at the bottom.
Click File > Save to save your changes.
Windows NT, 2000, and XP
Click Start > All Programs > Accessories > Notepad.
Click File > Open.
In the File name field, type
C:\Windows\System32\Drivers\etc\hosts
Click Open.
If the hosts file contains entries, add yours at the bottom.
Click File > Save to save your changes.
Linux
Open a terminal window.
Open the hosts file in a text editor (you can use any text editor) by typing the following line:
sudo nano /etc/hosts
Enter your password.
The file already contains some lines, add your line in the end of the file in a new line
Press Control+x.
When asked if you want to save your changes, answer Yes.
Mac OS X 10.6 through 10.8
Open Applications > Utilities > Terminal.
Open the hosts file by typing the following line in the terminal window:
sudo nano /private/etc/hosts
Type your user password.
If the hosts file contains entries, add yours at the bottom.
Save it by pressing Control+x and answering Yes.
Have your changes take effect by flushing the DNS cache with the following command:
dscacheutil -flushcache