• Is there a way to use a variable in the Settings > “Site Address (URL)” field to retrieve the IP address on my WordPress server? I am trying to test development using a mobile device on my local wifi. On the mobile device I can get to the home page, which is “themeless”, but can navigate no further. I get an error (invalid address) when I try to navigate my test site using my mobile device, because the pages resolve to “localhost” (or whatever I put into the “Site Address (URL)” field). The complication is DHCP – my system gets a new address often enough that setting a fixed local IP on my server is burdensome. I have some sites developed using Dreamweaver, and they work fine. So, I know the issue is in the WordPress implementation/configuration.

Viewing 2 replies - 1 through 2 (of 2 total)
  • I’ve gotten around this by simply using the local IP address in the Site Address field. My PC is using DHCP, but it doesn’t change THAT often to be honest. Sometimes I just change it by hand. Then on my phone I type in 192.168.1.8/website and it loads fine for testing.

    For non-manual updates I suppose you could set these variables in the wp-config.php like this snipt shows: https://snipt.net/Inconito/wordpress-dynamic-base-url/

    That should make it dynamic friendly.

    Let everyone know on here if it works for you!

    Thread Starter jamdawcrain41940

    (@jamdawcrain41940)

    Thanks for your suggestions. I have hard coded the local IP of my wamp system as the “Site Address (URL)” entry – that works to get to the site. I was trying to figure a more succinct or elegant way, within the user/admin interface of WordPress, if possible, to make it dynamic. …making sure I had not missed something. I will try that code snippet when I get to the point where I want to continue debugging rather than developing.

    My second problem (not stated forcefully enough above, I suppose) is that, on my mobile device, I still do not see the “theme” or any formatting, on any page. I get text-only pages. I cannot find a solution for that, either. I do see all formatting on my mobile device for the Dreamweaver developed sites I have.

    Thanks!

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Mobile testing on wifi’ is closed to new replies.