0

I installed WAMP on Windows 10 and I can access my WordPress website using http://localhost/wp/.

However, when I try to access it from another computer using the local IP (for example http://192.168.0.70/wp/) then that computer is redirected to http://localhost/wp/ (because of siteurl and home options that point to http://localhost/wp/ in Settings → General, see Changing The Site URL) and thus I can't access the website from any network computer.

The solution is to set siteurl and home to the IP http://192.168.0.70/. Then I can access the website from my computer and from all network computers.

But the problem is as soon as I disconnect my computer from that network and lose my 192.168.0.70 IP I can't access WordPress at all (unless I manually update siteurl and home in the database back to "localhost").

Is there a way to be able to access WordPress in all three situations?

2 Answers 2

2

Set yourself up with a static IP address and then it won't ever change.

See here for instructions on how to do just that. Any problems, post back. :)

http://www.howtogeek.com/howto/19249/how-to-assign-a-static-ip-address-in-xp-vista-or-windows-7/

1
  • Thank you, I just tried this and I can confirm it works even with LAN disabled :) That answers the question.
    – Jimsea
    Oct 12, 2016 at 16:33
0

Use a domain name instead and modify your hosts file, more modern environments such as VVV or docker based systems will do this automatically.

Then, you can modify the hosts file on another machine to point to the host without needing to use an IP as your sites address

The bonus of this, is you can set your domain used to the final production site, letting you fully test things in advance

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.