1692 posts Building the Web.
  • Has been a beta tester for an Envato feature
  • Sells items exclusively on Envato Market
  • Has sold $250,000+ on Envato Market
  • Had an item featured on Envato Market
+7 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!

3497 posts
  • Elite Author: Sold more than $75,000 on Envato Market
  • Has sold $750,000+ on Envato Market
  • Located in United States
  • Helps us moderate the forums
+10 more
sevenspark 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.

:)

1029 posts
  • Has referred 500+ members
  • Has sold $500,000+ on Envato Market
  • Has collected 50+ items on Envato Market
  • Elite Author: Sold more than $75,000 on Envato Market
+6 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'');
1692 posts Building the Web.
  • Has been a beta tester for an Envato feature
  • Sells items exclusively on Envato Market
  • Has sold $250,000+ on Envato Market
  • Had an item featured on Envato Market
+7 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!

3497 posts
  • Elite Author: Sold more than $75,000 on Envato Market
  • Has sold $750,000+ on Envato Market
  • Located in United States
  • Helps us moderate the forums
+10 more
sevenspark 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!

2010 posts
  • Has referred 50+ members
  • Has sold $500,000+ on Envato Market
  • Has collected 10+ items on Envato Market
  • Elite Author: Sold more than $75,000 on Envato Market
+9 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.

Helpful Information

  • Please read our community guidelines. Self promotion and discussion of piracy is not allowed.
  • Open a support ticket if you would like specific help with your account, deposits or purchases.
  • Item Support by authors is optional and may vary. Please see the Support tab on each item page.

Most of all, enjoy your time here. Thank you for being a valued Envato community member.

Post Reply

Format your entry with some basic HTML. Read the Full Details, or here is a refresher:

<strong></strong> to make things bold
<em></em> to emphasize
<ul><li> or <ol><li> to make lists
<h3> or <h4> to make headings
<pre></pre> for code blocks
<code></code> for a few words of code
<a></a> for links
<img> to paste in an image (it'll need to be hosted somewhere else though)
<blockquote></blockquote> to quote somebody

:grin: :shocked: :cry: Complete List of Smiley Codes

by
by
by
by
by
by