Page 1 of 1

How to access XAMPP localhost on another computer?

PostPosted: 25. June 2023 22:05
by alpha
I can't seem to find up to date instructions on how to configure Apache to be able to access wordpress on another computer under the same wifi.

Re: How to access XAMPP localhost on another computer?

PostPosted: 27. June 2023 10:21
by Altrea
localhost always points to your very own computers network loopback adapter. You cannot use localhost for requests from another computer.

Re: How to access XAMPP localhost on another computer?

PostPosted: 27. June 2023 11:03
by Nobbie
Enter the LAN IP (instead of localhost) of Xampp Server in your browser to access Xampp. No modification in Apache necessary.

If you already installed WordPress, edit wp-config.php and replace all occurences of "localhost" by the LAN IP as well.

Re: How to access XAMPP localhost on another computer?

PostPosted: 27. June 2023 21:53
by alpha
I tried making changes to the wp-config.php file but when trying to access wordpress i was prompted with "Error establishing a database connection".

Re: How to access XAMPP localhost on another computer?

PostPosted: 27. June 2023 21:59
by Altrea
Then you probably changed the DB_HoST variable from localhost to something else. That is not the setting you need to touch.
You need to tell us much more in detail what you are doing exactly.

If it is an option for you, you should install wordpress fresh by using the LAN IP. That is the easiest way to get a working wordpress configuration.
Or google for "Change Wordpress base url" or "wordpress migration from localhost to server"