I am working on two seperate computers (office PC and home laptop) on the same project. It's a WordPress website. I use Git and Bitbucket for version control and remote branching. On both machines, I'm running Apache2 webserver on Ubuntu 15.10 in virtual host mode. My project is on virtual host on port 91, so http://localhost:91 calls the project on both machines.

At my office PC, I'm connected to a LAN and thus, have a private IP address 192.168.xxx.yy. To test my project site on different devices, I've added this private IP address to my Apache2 vhost config. In WordPress admin, I've set SiteURL = 192.169.xxx.yy. Now I can call the site not only from localhost (work PC) but also from other devices in our LAN / VPN.

To transfer development states between work PC and home laptop, I added the local webroots to the Git repositories plus the latest database export as an sql file. Changing machines, I pull from Bitbucket and run the latest sql dump on the local database.

Now my issue is, since I've changed WP settings on work PC of SiteURL from to the private IP, I'm also transferring this setting to my home laptop. This machine is not connected to any LAN and obviously has no private IP address other than 127.0.01 for localhost. But Wordpress is still looking for 192.168.xxx.yy when I call http://localhost:91 on my home laptop. So, how can I emulate a private IP, which is identical to the one on my office PC? This is neccessary, as WordPress also stores media locations in the database, hence, using the private IP as URL-root, when I add content on work PC.

I've tried to change network settings in Ubuntu network manager from DHCP to manual and added IP address 192.168.xxx.yy. Didn't work. I've also set 192.168.xxx.yy as ServerAlias in the Apache vhost config file. Didn't work either. Any ideas are much appreciated.

  • From the tag: "Questions about installing and maintaining WordPress belong on WordPress.SE"
    – DavidPostill
    Jan 24, 2016 at 15:31
  • I'm not quite sure, if I got your message right. Thus, I'd like to kindly ask, what do you want to tell me with your comment, @DavidPostill?
    – Bunjip
    Jan 24, 2016 at 16:21
  • You are asking an off-topic question. See On Topic. Your question should be posted on wordpress.stackexchange.com
    – DavidPostill
    Jan 24, 2016 at 17:30
  • Allright got it. Thanks @DavidPostill. I've studied superuser.com/help/on-topic before and felt comfortable to post my question here - as it is definitely not a WordPress question nor is it a plain stackoverflow question. I didn't even feel it belonging to webmasters or serverfault ... Is there a 'where does my question belong to?' meta forum available to prevent future cross posting issues?
    – Bunjip
    Jan 25, 2016 at 13:11
  • meta.stackexchange.com with tag site-recommendation
    – DavidPostill
    Jan 25, 2016 at 13:15

1 Answer 1


The Right Way (tm)

  • Use name-based SiteURL in WordPress (reconfigure vhost in Apache, if it's needed) to something like SiteURL = myblog
  • Assign for the same hostname myblog different IP-addresses in hosts-file on both systems

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.