I can only partially access XAMPP development server over my network.
I am trying to access my main computer from my laptop via http://192.168.0.4/website
The page loads the text only.
No JavaScript, Images, CSS or Links are rendered.
When viewing the source of http://192.168.0.4/website from my laptop, I see that all links still have,
http://localhost/style.css
http://localhost/javascript.js
http://localhost/image.jpg
etc…
These links are not hardcoded as its a WordPress installation I am trying to access.
Any ideas on how I can correctly access my WordPress installation on my main computer from my laptop? Is it something in the Apache httpd.conf file I need to edit or…? Got me stumped!
Thanks guys..
WordPress attaches it’s site URL to all links. You installed it on your laptop with “localhost” as the site URL, so that is what is displayed when you look at the site.
Add the following lines (modified for your specific setup) to your wp-config.php:
This is a temporary solution. When you are ready to make the site live, change the entries in the wp_options table in the wordpress database, and remove the two lines in wp-config.php.