- Microlancer Beta Tester
- Author had a File in an Envato Bundle
- Author was Featured
- Bought between 50 and 99 items
- Exclusive Author
- Has been a member for 3-4 years
- Item was Featured
- Sold between 100 000 and 250 000 dollars
Hello Networking Gurus,
I do all my web developing work on a Mac. It’s easy to work with and it has all the features I could dream of, except one -> IE . So I have a PC for IE testing.
I connect both with the mac and PC via a router to the internet and it’s fairly easy to test IE compatibility from the PC ( via inputing the Mac’s IP 192 .168.0.101 or so into the IE bar ). So if I have a site in a folder named test in my Mac localhost, i access it from my mac like so -> http://localhost/test and from my pc ( ie ) like this http://192.168.0.101/test .
The problem is that this does not work with WP ( or other CMSs ) installs because WP gets all it’s assets from absolute urls. So if I access http://192.168.0.101/wordpress from my PC, the source will load but the external assets won’t because they point to localhost not 192.168.0.101
Any solutions ( like a proxy or something ? ) ?
My attempted solutions
1. Renamed WordPress Address (URL) from http://localhost/wordpress to http://192.168.0.101/wordpress – works, but looking for a more elegant solution where I can keep the localhost format on my Mac
2. Accessed PC hosts file – added
localhost 192.168.0.101to the file – did not work
Thanks!
- Sold between 250 000 and 1 000 000 dollars
- Community Moderator
- Author was Featured
- Item was Featured
- Bought between 50 and 99 items
- Referred between 1000 and 1999 users
- Has been a member for 3-4 years
- Repeatedly Helped protect Envato Marketplaces against copyright violations
I agree it’s not glamorous, but I just go into the wp_options table and adjust both the ‘siteurl’ and the ‘home’ options to use the local network IP instead of localhost. Then everything works for me – and in my experience accessing the site via localhost still works – just when you navigate using the nav menu it’ll redirect you to the IP-based URL , as that’s how those absolute menu item URLs will be generated.
Note that I have the same situation as you except Linux vs PC rather than Mac – not sure if that makes an difference.
I suppose a more elegant solution might be to run a local DNS server – though to me that seems overkill.

- Author had a File in an Envato Bundle
- Author was Featured
- Bought between 50 and 99 items
- Exclusive Author
- Has been a member for 4-5 years
- Item was Featured
- Referred between 500 and 999 users
- Sold between 250 000 and 1 000 000 dollars
sevenspark said
I agree it’s not glamorous, but I just go into the wp_options table and adjust both the ‘siteurl’ and the ‘home’ options to use the local network IP instead of localhost.
I do this, too… except for instead of changing anything in the DB, I just have these two lines in my wp-config.php that I comment out when not testing on Windows:
define('WP_HOME','http://xx.x.x.x:8888/site');
define('WP_SITEURL','http://xx.x.x.x:8888/site'');
- Microlancer Beta Tester
- Author had a File in an Envato Bundle
- Author was Featured
- Bought between 50 and 99 items
- Exclusive Author
- Has been a member for 3-4 years
- Item was Featured
- Sold between 100 000 and 250 000 dollars
ThemeBlvd said
I do this, too… except for instead of changing anything in the DB, I just have these two lines in my wp-config.php that I comment out when not testing on Windows:define('WP_HOME','http://xx.x.x.x:8888/site'); define('WP_SITEURL','http://xx.x.x.x:8888/site'');
Seems like a good compromise.
Thanks!
- Sold between 250 000 and 1 000 000 dollars
- Community Moderator
- Author was Featured
- Item was Featured
- Bought between 50 and 99 items
- Referred between 1000 and 1999 users
- Has been a member for 3-4 years
- Repeatedly Helped protect Envato Marketplaces against copyright violations
ThemeBlvd said
sevenspark said
I agree it’s not glamorous, but I just go into the wp_options table and adjust both the ‘siteurl’ and the ‘home’ options to use the local network IP instead of localhost.I do this, too… except for instead of changing anything in the DB, I just have these two lines in my wp-config.php that I comment out when not testing on Windows:
define('WP_HOME','http://xx.x.x.x:8888/site'); define('WP_SITEURL','http://xx.x.x.x:8888/site');
Nice idea, I like that better – easier to switch on and off – thanks for the tip!
- Sold between 100 000 and 250 000 dollars
- Author had a File in an Envato Bundle
- Has been a member for 4-5 years
- Author had a Free File of the Month
- Won a Competition
- Author was Featured
- Item was Featured
- Bought between 10 and 49 items
You can configure wordpress domain like wp.lan, then set ip for it both OSX and Windows hosts file. You will now access your wp installation on the address http://wp.lan from both systems.
