I have wordpress installed in a sub-directory "www" on my laptop using XAMPP 7.3.0-0 (OS: Ubuntu 18.04 LTS Desktop).
On my laptop, I can access it through http://localhost/www/
or http://192.168.8.200/www/
(after changing WP_HOME
and WP_SITEURL
in wp-config.php
to replace localost with IP address).
The Problem:
When I access http://192.168.8.200/www/
from other devices, it redirects me to http://localhost/www/
saying
This site cannot be reached
localhost refused to connect.
I can access other sub-directories like http://192.168.8.200/ABC/
and http://192.168.8.200/XYZ/
on same server without any issue.
Information that may help to resolve the problem
This is .htaccess
file in "www" directory
# BEGIN WordPress
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /www/
RewriteRule ^index\.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /www/index.php [L]
</IfModule>
# END WordPress
wp-config.php
setting:
define( 'WP_HOME', 'http://192.168.8.200/www' );
define( 'WP_SITEURL', 'http://192.168.8.200/www' );
- How can I access
http://192.168.8.200/www/
from other devices on same network? Any clue... - How can I use my computer name instead of static IP?
Thanks