Hiall,
Iâm trying to simply test my local MAMP PRO wordpress site on my iPhone through my local LAN network.
I test my on my Mac via the URL which works fine
http://mysite:8888/
For my iPhone
If I go to MAMP PRO select my website/host from the left column and check the via Xip.ic (LAN only) option/checkbox
it provides a URL which is
http://mysite.10.0.1.6.xip.io:8888
I then send myself an email with this link which I click from the iPhone
When I load http://mysite.10.0.1.6.xip.io:8888 in my iPhone, the URL loads and I can see my website but there is no images, or CSS styling, the sites links are not correct and I only see the sites text.
I understand I need to change the site to load like its loading from mac to my iPhone urls and that I can change the
WordPress Address (URL)
Site Address (URL)
without having to do it in the wp-admin settings screen by adding by doing
define('WP_HOME','http://mysite.10.0.1.6:8888');
define('WP_SITEURL','http://mysite.10.0.1.6:8888');
but this does not make a difference either
Iâve also tried
define('WP_HOME', 'http://mysite.10.0.1.6.xip.io:8888');
define('WP_SITEURL', 'http://mysite.10.0.1.6.xip.io:8888');
Iâve found various examples like
https://wordpress.stackexchange.com/questions/98386/testing-local-server-with-mamp-wordpress-on-mobile-device
http://www.designshifts.com/view-local-wordpress-website-on-your-iphone-or-ipad-with-mamp/
which I have spent hours trying to replicate but I just canât figure it out!
Iâm not sure if itâs because Iâm typing my urls / ports different/incorrectly and typing my URLâs incorrectly to include ports etc, or because I have the latest version of MAMP PRO and Yosemite and these examples are a few years old etc, or maybe I need to be clearing the the word press / MAMP cache, restarting on every atempt etc?.
Any help would be greatly appreciated!
If you already have replaced the home and siteurl in the General Settings. Note: Wp-config alternative hack as you mentioned didn’t work for me.
In Mamp Pro, select your host e.g. (example.dev).
Your Images and CSS should appear. BUT links are still not working. I hope you’d help me improving the answer.
In the WordPress settings, change the below:
To your device local network I.P. address, for example:
This will work!
To be honest, the simplest way I have found is to just go into your database and look for
siteurl
andhome
which are normally record 1 & 2 in the database, and update it to your network IP address.It can then be visited in the browser from that IP address for anyone on the network.
WordPress just isn’t built to make xip.io work because it defines the site name statically.