Add a local hosts-file entry so this computer opens your migrated WordPress site on its Pressidium cluster IP before you change public DNS. This procedure applies to Pressidium Advanced Network only.

The hosts file maps an IP address to a domain name on this computer and overrides public DNS lookup. The file format is the same on each operating system; the location is not.

Use this when you want to test a migrated site on Pressidium Advanced Network before you change DNS, including before you go live with SSL enabled.

Confirm you are on Pressidium Advanced Network

Check the site’s network before you edit the hosts file.

  1. Open Website Overview for the site.

  2. Look at the Summary widget.

  • If Summary shows the Pressidium EDGE label, the site is on Pressidium EDGE. Hosts-file testing does not apply. Do not add a hosts-file entry for this site. Stop here.

  • If Summary does not show that label, the site is on Pressidium Advanced Network. Continue.

Before you start

  • You have already migrated the site to Pressidium Managed WordPress Hosting.

  • You confirmed the site is on Pressidium Advanced Network using the Summary widget check above.

  • You have a Pressidium cluster IP and the domain you will test. If you need the IP, see Find your website’s IP addresses.

  • You can edit the hosts file on this computer. Windows 11, Windows 10, Windows 8, Windows 7, and Windows Vista require an administrator editor.

Hosts-file entry

Add one line that uses your Pressidium cluster IP and domain (replace the example values):

123.123.123.123 www.domain.com domain.com

This computer then uses that IP for the domain without a public DNS lookup.

The following sections show how to open and save the hosts file on these operating systems.

  • Windows 11, Windows 10, Windows 8, Windows 7, and Windows Vista

  • Windows NT, Windows 2000, and Windows XP

  • Linux

  • macOS Big Sur, Monterey, Ventura, Sonoma, Sequoia, and Tahoe

  • Mac OS X 10.6 through 10.8

Windows 11, Windows 10, Windows 8, Windows 7, and Windows Vista

Windows 11, Windows 10, Windows 8, Windows 7, and Windows Vista use User Account Control (UAC), so Notepad must run as administrator.

Windows 11 / Windows 10 / Windows 8

  1. Press the Windows key.

  2. Type Notepad in the search field.

  3. In the search results, right-click Notepad and select Run as administrator.

  4. Click Yes if prompted with a “Do you want to allow this app to make changes to your device” dialog.

  5. In Notepad, open c:\Windows\System32\Drivers\etc\hosts. You may need to select All Files (*.*) in the Open dialog to see the hosts file.

  6. If the file already has lines, add your entry on a new line at the end.

  7. Click File > Save.

Windows 7 and Vista

  1. Click Start > All Programs > Accessories.

  2. Right-click Notepad and select Run as administrator.

  3. Click Continue on the Windows needs your permission UAC window.

  4. When Notepad opens, click File > Open.

  5. In the File name field, type c:\Windows\System32\Drivers\etc\hosts.

  6. Click Open.

  7. If the hosts file already has entries, add yours at the bottom.

  8. Click File > Save.

Windows NT, 2000, and XP

  1. Click Start > All Programs > Accessories > Notepad.

  2. Click File > Open.

  3. In the File name field, type c:\Windows\System32\Drivers\etc\hosts.

  4. Click Open.

  5. If the hosts file already has entries, add yours at the bottom.

  6. Click File > Save.

Linux

  1. Open a terminal window.

  2. Open the hosts file in a text editor (you can use any text editor) by typing:

    sudo nano /etc/hosts

  3. Enter your password.

  4. If the file already has lines, add your entry on a new line at the end.

  5. Press Control+X.

  6. When asked if you want to save your changes, answer Yes.

macOS Big Sur, Monterey, Ventura, Sonoma, Sequoia, and Tahoe

  1. Press Command+Space, type Terminal, and press Enter.

  2. Open the hosts file by typing the following line in the terminal window:

    sudo nano /etc/hosts

  3. Type your user password.

  4. If the hosts file already has entries, add yours at the bottom.

  5. Save by pressing Control+X and answering Yes.

Flushing the DNS cache is optional. To make the change take effect without restarting, run:

sudo dscacheutil -flushcache && sudo killall -HUP mDNSResponder

Mac OS X 10.6 through 10.8

  1. Open Applications > Utilities > Terminal.

  2. Open the hosts file by typing the following line in the terminal window:

    sudo nano /private/etc/hosts

  3. Type your user password.

  4. If the hosts file already has entries, add yours at the bottom.

  5. Save by pressing Control+X and answering Yes.

  6. Flush the DNS cache so the change takes effect:

    dscacheutil -flushcache

Need help?

If the migrated site does not load correctly during testing, or you are not sure it is ready for a DNS switch, contact Support before you point live traffic to Pressidium. Include the domain, the Pressidium IP you added to the hosts file, and what you see in the browser.

If Summary shows Pressidium EDGE and you still need help before a DNS change, contact Support. Include the domain and that the widget shows the Pressidium EDGE label. Do not use this hosts-file procedure.

Open a support request

Where to go next