Rajesh
Rajesh

Reputation: 21

How do I access my localhost WordPress website on XAMPP from another computer?

I have a localhost WordPress website on XAMPP, and I would like to access it from another computer. How do I do it?

So far I've tried the following actions with no success:

  1. Go to Admin Panel > Settings > General and replace localhost with your ip-address for WordPress Address (URL) and Site Address (URL).

  2. edit httpd.conf file in notepad Search for Listen 80 Above line would read like- #Listen 0.0.0.0:80 / 12.34.56.78:80 Change the IP address and replace it with the static IP Save the httpd.conf file ensuring that the server is pointed to #Listen 192.168.1.193:80

  3. In the application root config.php (db connection) replace localhost with IP address of the server

  4. Add in httpd.conf: Allow from all

  5. changed the structure of .htaccess

  6. Add in Directory in httpd-xampp.conf: Require local

Upvotes: 1

Views: 5180

Answers (1)

Juan Montes
Juan Montes

Reputation: 21

So, i found that actually you don't have to do much, all you have to do is go to the Wordpress Admin panel, then General Settings, after that you have to change the WordPress Address (URL) and the Site Address (URL):

To be instead of http://localhost/wordpress_folder_name to http://your_ip/wordpress_folder_name

As shown is the screenshot

This is because when you try to access the localhost from another computer, the project will try to load all the wp-content from an unexisting localhost of the device your trying to access with and not from the device that is running XAMPP.

Upvotes: 1

Related Questions