80% off your 1st month on monthly WordPress hosting plans.
  1. Home
  2. Get Real Fast Website Help Now
  3. How can I preview/develop my site without pointing it to WPX? – macOS

How can I preview/develop my site without pointing it to WPX? – macOS

In this article we will show you how you can preview and even develop your website without pointing the domain to the new server. That happens with the help of a hosts file which is located on your Windows computer.

What is a Hosts File?

The Hosts File is a local file that maps domain names to IP addresses. The purpose of using that file is simple. The plan is to point your domain to a specific IP Address and “force” it to load from that location before actually making any DNS changes. In other words, it’s overriding your actual DNS zone. So, every time you visit a website, your computer will check the hosts file first to see which IP address it connects to and load it from there, instead of the IP address it is pointed to by DNS records.

In short, by editing the Hosts file, you’ll be able to open your website locally. 

Why use the Hosts File?

As you know, for your website to start loading from the new server after moving it to WPX, there will be a DNS propagation time which can take up to 48 hours. During that time, your website will load for the public but it is not recommended to make changes to it because those changes may not be saved on the new server.

That’s why editing the Hosts file is useful if you want to modify or just check your site after moving it to the new hosting and see how it’ll look without pointing the domain.

Another example, of why you can use the Hosts File, is when you are developing your website and you need to see the new content you’ve made without clearing all the cache (server, browser, and plugin) after you made a new change. (OR without changing the DNS records for the public).

You can use this guide for any version of Mac OS.

Step 1. Log in to your WPX account

Begin by logging into your WPX account. You can do this by visiting the WPX login page.​

Step 2. Go to Control Panel

Once logged in:

  1. Locate your hosting plan in the WPX client area.
  2. Click the Control Panel button next to the plan you wish to manage.

If you have more than five hosting plans of the same type (WordPress, Agency or WooCommerce), not all may appear on the homepage. Use the WordPress Hosting, Agency Hosting or WooCommerce Hosting tab in the left-hand menu to find your service.

Step 3. Copy the Server IP Address

Now that you have entered your WPX Control Panel, make sure to navigate to Plan details (1) and there you will see the IP Address (2) of the server which you need to copy, you will need it for later while editing the hosts file.

Step 4. Open Terminal

You need to be with admin permission on your MAC device to complete the following steps.

Use the Command ⌘ + Space keyboard shortcut, once the Spotlight search field appears in the middle of your screen, please type Terminal and open it.

Step 5. Open the hosts file

To open the hosts file, enter the following command:

sudo nano /private/etc/hosts

Once you type in your MAC password, you will be directed to the hosts file.

Step 6. Add your domain to the hosts file

At the bottom of the file, insert your Server IP Address, followed by a space, then your non-www and www versions of your domain name.

The Server IP Address can be seen in My ServicesWordPress HostingManage Service (next to the hosting plan you’re managing) → Service details (under Server Details).

Step 7. Save the changes

To save the changes, press CTRL + O. Then launch your browser and navigate to the domain you inserted into your hosts file.

In some rare cases, your Mac might try to save the hosts file to “/private/etc/hosts”, instead of “/etc/hosts”. The first path is incorrect and indicates that some permissions on the Mac device are not set properly or that the file is locked from editing. It would be best to check with Apple Support, who can help resolve that.

If you get stuck with anything discussed on this page, please contact WPX Support via live chat (use the bottom right-hand widget) and they will respond and help within 30 seconds or less.

Was this article helpful?

Related Articles

Need Support?
Can’t find the answer you’re looking for? Don’t worry we’re here to help!
Contact Support