I am developing a new WordPress theme and am doing this locally on my laptop using MAMP. On my laptop I can access the site at localhost:8800.
Is there a way I can visit this localhost site from my iPhone? I’d like to see what the theme looks like on mobile devices rather than just resizing my browser. Could this work if I make an ad hoc WiFi network between the two?
try the link
How do you access a website running on localhost from iPhone browser here is the something you might be looking for.
or if you want to test your site on different devices http://quirktools.com/screenfly/ this link might be helpful 😉
Head over to this site (http://xip.io/) and in your vhost setup the following replacing the IP address with your local IP:
Then on your device head over to mysite.local.192.168.1.81.xip.io
The easiest way is to connect your mac and iphone to the same WiFi network. Then get your IP address from System Preferences | Network. It will be shown in the status section and will probably look something like 10.10.5.100.
Then on the iphone go to
http://10.10.5.100:8800
Assuming the iPhone is on the same network as the test server, just navigate to it’s IP address on your phone.
EDIT: If you have multiple host names, then you can use DNSMasq. If you have a dd-wrt router, add the following lines to the ‘Additional DHCP Options’ box in the Services page – and make sure DNSMasq is enabled 🙂
This will direct .dev domains to 192.168.1.2 – adjust to suit your own needs.