How to Access and Test Your Localhost WordPress Site on Any Mobile Device

How to Access and Test your Localhost WordPress site on any Mobile device

When developing a WordPress site locally, you may want to preview it on your smartphone or share it with friends, coworkers, or at a WordPress meetup. The good news is - you can easily do this without using third-party routing or tunneling software. All you need is your PC, your mobile device, and a simple network setup.

Step 1: Create a Wireless Local Area Network (WLAN)

First, set up a wireless hotspot on your mobile device and connect your PC to it:

  • Turn on the mobile hotspot on your smartphone.
  • On your PC, connect to the hotspot via Wi-Fi.
  • If you can’t see your hotspot signal on Windows 10, press Win + INetwork & Internet → turn on Wi-Fi manually.

Step 2: Retrieve Your IPv4 Address

To allow mobile access, you need the PC’s IPv4 address from the WLAN network:

  1. Press Win + R to open the Run dialog.
  2. Type cmd and hit Enter to open the Command Prompt.
  3. In the command window, type ipconfig and press Enter.
  4. Copy the IPv4 Address (e.g., 192.168.**.***).

Step 3: Update WordPress URL Settings

Now replace localhost with your IPv4 address in WordPress:

  • Log in to your WordPress dashboard.
  • Go to Settings → General.
  • Update the WordPress Address (URL) and Site Address (URL) fields with your IPv4, e.g. http://192.168.**.***/mysite
  • Click Save Changes (you’ll be logged out automatically).

Step 4: Test on Mobile

Open a browser (e.g., Chrome) on your mobile device, enter the updated URL, and load your site. Since both devices share the same WLAN, your site will display on mobile exactly as it runs locally.

Bonus: Share Access With Others

Any device connected to the same hotspot network can access your WordPress site using the same IPv4-based link. This is great for live previews during WordPress meetups or collaborative testing.

Conclusion

This method is quick, secure, and requires no extra software. By simply using your mobile hotspot and IPv4 address, you can test your localhost WordPress site on mobile and share it with others seamlessly.

If you found this tutorial useful, drop a comment below and let me know how it worked for you!

No comments

Theme images by mammuth. Powered by Blogger.