I have setup a LAMP server on my Raspberry Pi 3. I am using it to host a WordPress site. When the pi is connected to my home server, I can use the pi's ip address from my laptop to view the site. Alternatively I can use localhost on the pi's GUI to view the site.

What I would like to do is using the same laptop and pi, access the WordPress site when both the pi and laptop are connected to my mobile phone's hotspot network, therefore being able to show the WordPress site when I am away from my home network. Thus far I have been unable to make this work.

Using $ hostname -I, I have found the pi's ip address but inputting it into the browser produces no connection to the word press site.

I'm unsure if there is security in the way or if there is another, better option, at my disposal.

  • What has your home server to do with the setup? Or do you mean your home internet router? How is the RasPi and the laptop connected at home? Wired or by WiFi? Now RasPi and laptop are disconnected from your home network and you have opened an access point on your mobile phone. RasPi and laptop are connected to that access point. You should always be able to use localhost on the RasPi to connect to its wordpress site and you should also be able to connect to the site from the laptop using the ip address shown with ip -br addr. Can you please confirm this? – Ingo Oct 16 '19 at 8:28
  • Please use ping in the first step, not the browser. You wrote: "..being able to show the WordPress site when I am away from my home network." If so, you have the laptop with you. Do you also have the RasPi with you or do you want to connect to the RasPi (being at home) through an internet connection? – Ingo Oct 16 '19 at 8:32
  • Welcome -- but this is a question about the functionality of your phone; the raspberry pi is not a determining factor in how traffic between nodes attached to the hotspot is routed. – goldilocks Oct 16 '19 at 13:22

Browse other questions tagged or ask your own question.