Contact Hosting Australia

1300 761 930

WordPress Development Sites / Temporary URLs Print

  • wordpress, temporary url, development
  • 0

If you are working on your WordPress site using a temporary URL on the Hosting Australia servers...for example if you have an existing Hosting Account elsewhere, and havent yet pointed the domain to Hosting Australia...you will most likely run into issues with how the WordPress site works and displays. This usually effects the way the site looks (CSS) and the admin login page.

Because WordPress is installed using a domain name/URL, and you are then accessing that particular WP install via an IP address instead, it will create an error state within WP. This is because WP will try to direct all the links, CSS files etc, to the domain name itself and not to the temporary IP you are working.  As the domain either does not host a WP install at all or does not host the WP install you are working at, the site is effectively broken.

Editing the "Host" file on your PC, will allow you to manually forcer the DNS to a set IP...preventing the above issues from occurring.  Setting a manual entry for your domain in the hosts file, will ask your PC/MAC only to look directly at the IP address itself, regardless of what the domain is pointed to.

IMPORTANT - remember to remove these entries, once you have updated your domain name, to prevent issues down the track.

The change is quite simple to make. It just involves adding two lines to the host file. For example, if you domain name was www.acmeproducts.com, and you are hosted on the IP of 101.0.93.98, the two lines required would be:

101.0.93.98 www.acmeproducts.com
101.0.93.98 acmeproducts.com

Please ensure you open the text edit as administrator, to work around Windows User Account Control (UAC).

For Windows 8l Windows 10 and Windows 11:

  1. Press the Windows key on your keyboard.
  2. Enter Notepad in the search field.
  3. From the search results, right-click Notepad and select Run as administrator.
  4. Once notepad has opened, navigate to c:\Windows\System32\Drivers\etc and open the file called "hosts"
  5. Add the two line entries, as mentioned above.
  6. Click File and then click on Save to finish your changes.

For Windows 7 and Vista:

  1. Click Start,  then All Programs and then choose Accessories.
  2. Right-click Notepad and choose Run as administrator.
  3. Click Continue on the UAC confirmation window.
  4. Once Notepad opens, click File then click on Open.
  5. Once notepad has opened, navigate to c:\Windows\System32\Drivers\etc and open the file called "hosts"
  6. Add the two line entries, as mentioned above.
  7. Click File and then click on Save to finish your changes.
For non windows environment, please consult your local IT Support provider.

Was this answer helpful?

« Back