Best way to create wordpress dev site on different server but when domain in use

Viewed 35

Looking for guidance on best practice in creating a new Wordpress website, online, when

A) I'll be hosting the site on a new server B) The site will need to be viewed by client online C) The site domain is currently live, in use and must remain directed to current server (until site complete) and D) Current site is very old and would likely throw up endless issues if transferred to the new server. E) No-one has access to the current server.

I'm currently looking at options around temp URL's, or just using a dev URL I use solely for builds. Then once complete and DNS redirected to the new server, Find and Replace all references of dev URL for the correct URL.

I've searched online but generally, only find answers to the queries "building site without impacting live site" or "building site locally". Not my query - "building a site online with a domain I can't use as it's in use etc".

Any guidance on this would be appreciated. Thank you.

1 Answers

Create an edit in your machines hosts file so that the live url points to your dev server instead of the live server. When the client needs to check the progress they can temporarily update their own hosts file to check and then delete it out to go back to seeing their current site.

Windows If you’re computer runs Windows, follow the instructions below:

  • Press the Windows key.
  • Type Notepad in the search field.
  • In the search results, right-click Notepad and select Run as administrator.
  • In Notepad, click File > Open
  • Change the File Type in the bottom right corner to All Files instead of Txt Files
  • Open the following file: c:\Windows\System32\Drivers\etc\hosts
  • Scroll to the bottom of the file and type the IP address of your dev server (xxx.xxx.xxx.xxx)
  • Press Tab
  • Type the address we gave you (www.whatever.com)
  • Click File > Save to save your changes.
  • Close Notepad

If Mac

  • Press Command & Space
  • Type Terminal
  • Press Enter
  • Type sudo nano /etc/hosts
  • Press Enter
  • Type the password you use to log into your machine
  • Press Enter
  • Scroll to the bottom of the file
  • Type the IP address of your server (XXX.XXX.XXX.XXX)
  • Press TAB
  • Type the web address we gave you (www.whatever.com)
  • Press Ctrl & X
  • Press Y to save
  • Press Enter
Related