Support » Localhost Installs » Issue to display local WordPress site on other devices with XAMPP

  • Hello,

    After a good search on the Internet and not finding the solution anywhere else, I decided to look for help here 🙂

    I am using XAMPP and I would like to view my local site on other devices, especially on a smartphone. This is my situation:

    – I am able to access the XAMPP dashboard on my phone by typing the IP address of my computer in the browser

    – my site’s URL http://localhost/manontest does not work on the phone. By modifying the site URL in localhost/phpmyadmin, switching “localhost” for the IP address of my computer, I am no longer able to open the site, neither on my computer nor on smartphone (in localhost/phpmyadmin wp_options, I modified the URL in both siteurl and home so it looked like http:/xxx.xxx.xxx.xx/manontest)

    – if, in addition, I modify the HOST in the wp-config.php file by changing the URL for http:/xxx.xxx.xxx.xx/manontest I still can not open the site.

    So to resume: I can access the XAMPP starting page from my phone but not my WordPress site, even under the URL http:/xxx.xxx.xxx.xx/manontest (x being the ip address).

    Thanks in advance for your help on this issue!
    Manon

    • This topic was modified 3 weeks, 5 days ago by Manon.
    • This topic was modified 3 weeks, 5 days ago by Manon.
    • This topic was modified 3 weeks, 5 days ago by Manon.
Viewing 6 replies - 1 through 6 (of 6 total)
  • Joy

    (@joyously)

    This is not a WordPress question.
    You can read about this on the XAMPP forum, though.
    https://www.apachefriends.org/community.html

    Thread Starter Manon

    (@manonv)

    Okay thanks!

    Thread Starter Manon

    (@manonv)

    Dear Joy,

    The XAMPP Forum sends me back hier, saying that this is a WordPress question and not a XAMPP one.
    Especially I want to ask: where is it possible to change my site URL? If I change it in wp-options on myphpadmin, and on wp-config, I can no longer access the site. Do I miss something with the SQL tables?

    Thanks you,
    Manon

    Joy

    (@joyously)

    WordPress runs on a server. In your case, that’s XAMPP, so the networking portion is up to the server, not WordPress.
    You set your site address in WordPress in Settings > General. That’s all it knows about the network. (that is what you changed in wp-options in phpmyadmin) Setting something in wp-config.php will override the option in the database. See https://wordpress.org/support/article/editing-wp-config-php/#wp_siteurl

    Sorry to say, but this is still not a WordPress question. Your environment dictates the visibility of WordPress, not WordPress itself.
    But I see this 2 year old question says they got it to work by clearing cookies: https://wordpress.org/support/topic/cant-access-localhost-website-on-lan/

    Thread Starter Manon

    (@manonv)

    Hello Joy,

    Thank you very much for your answer. Unfortunately I still could not make it work. I also found a topic with the same issue but the guy does not seem to have solved the problem:
    https://wordpress.org/support/topic/errorlocalhost-site-does-not-respond-to-its-own-ip-address/

    About setting the site address in WordPress Settings > General: for me this option is not available. The fields are not even greyed out, they are just not there. Any idea why?
    I guess it is not so much of a problem if it is the same as changing it in phpmyadmin.
    If I want to change the server, is the only thing I have to do to change the siteurl and home on myphpadmin?

    Anyway, my wish from the beginning was to display the site on other devices mainly to have an idea how it would look like. I believe I am going to leave it there, and simply start using a website like http://apps-fr.orson.io/piresponsive
    As the Customizer and Elementor do not seem to propose a landscape view of the tablet and mobile versions, I guess this will do the trick.

    Thanks again for your help,
    Manon

    • This reply was modified 3 weeks, 2 days ago by Manon.
    Joy

    (@joyously)

    About setting the site address in WordPress Settings > General: for me this option is not available.

    I think this happens when you put the define in wp-config.php. Since it overrides, there is no point in showing the option to the user.

    If I want to change the server, is the only thing I have to do to change the siteurl and home on myphpadmin?

    Again, if you have a define in wp-config.php, it doesn’t do any good to change the database.

Viewing 6 replies - 1 through 6 (of 6 total)
  • You must be logged in to reply to this topic.