1574 posts Building the Web.
  • Elite Author
  • Sold between 250 000 and 1 000 000 dollars
  • Exclusive Author
  • Author had a File in an Envato Bundle
  • Most Wanted Bounty Winner
  • Bought between 50 and 99 items
  • Has been a member for 4-5 years
+2 more
ZoomIt says

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.101
to the file – did not work

Thanks!

3365 posts
  • Elite Author
  • Sold between 250 000 and 1 000 000 dollars
  • Community Moderator
  • Bought between 50 and 99 items
  • Referred more than 2000 users
  • Has been a member for 4-5 years
  • Repeatedly Helped protect Envato Marketplaces against copyright violations
+4 more
sevenspark Volunteer moderator says

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.

:)

1028 posts
  • Elite Author
  • Sold between 250 000 and 1 000 000 dollars
  • Author had a File in an Envato Bundle
  • Bought between 50 and 99 items
  • Exclusive Author
  • Has been a member for 4-5 years
  • Referred between 500 and 999 users
+1 more
ThemeBlvd says
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'');
1574 posts Building the Web.
  • Elite Author
  • Sold between 250 000 and 1 000 000 dollars
  • Exclusive Author
  • Author had a File in an Envato Bundle
  • Most Wanted Bounty Winner
  • Bought between 50 and 99 items
  • Has been a member for 4-5 years
+2 more
ZoomIt says
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!

3365 posts
  • Elite Author
  • Sold between 250 000 and 1 000 000 dollars
  • Community Moderator
  • Bought between 50 and 99 items
  • Referred more than 2000 users
  • Has been a member for 4-5 years
  • Repeatedly Helped protect Envato Marketplaces against copyright violations
+4 more
sevenspark Volunteer moderator says
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!

1991 posts
  • Elite Author
  • Sold between 250 000 and 1 000 000 dollars
  • Author had a File in an Envato Bundle
  • Has been a member for 5-6 years
  • Author had a Free File of the Month
  • Won a Competition
  • Bought between 10 and 49 items
+4 more
bitfade says

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.

by
by
by
by
by
by