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 127.0.0.1 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.