WordPress multisite cannot be accessed in local network

i want to ask how to access wordpress multisite in local network.

I`m using xampp-win32-5.6.14-4-VC11 as the server, and wordpress v4.3.1.

Read More

I can access XAMPP and a normal wordpress from another computer in the same network already.

However, after updated to wordpress multisite i can no longer access it from another computer in the same network, the address will automatically redirect to localhost and i try to change this line in

wp-config.php

from:

define('DOMAIN_CURRENT_SITE', 'localhost');

to:

define('DOMAIN_CURRENT_SITE', '[current_ip_address]');

it will no longer automatically redirect to “localhost” but i still can not access wordpress multisite form another computer.

Related posts

2 comments

  1. Finally i found a way
    In my server computer in the local network
    Note: the wordpress ‘siteurl’ and ‘home’ in the database is ‘www.website.com’
    I need to set

    1. C:xamppapacheconfextrahttpd-xampp.conf
        <LocationMatch "^/(?i:(?:xampp|security|licenses|phpmyadmin|webalizer|server-status|server-info))">
            #Require local
            ErrorDocument 403 /error/XAMPP_FORBIDDEN.html.var
        </LocationMatch>
    
    

    I disable Require local

    1. C:xamppapacheconfextrahttpd-vhosts.conf
           <VirtualHost *:80>
               <Directory "C:/xampp/htdocs/www/website">
                   Options Indexes FollowSymLinks Includes ExecCGI
                   AllowOverride All
                   Order allow,deny
                   Allow from all
               </Directory>
               DocumentRoot "C:/xampp/htdocs/www/website"
               ServerName www.website.com
               ServerAlias www.website.com
               ErrorLog "logs/www.website.com-error.log"
               CustomLog "logs/www.website.com-access.log" common
            </VirtualHost>
    
    
    1. C:WindowsSystem32driversetchosts
        127.0.0.1 www.website.com
    
    

    After that from the computer in the local network who want to access it
    *This one fix my problem
    1. C:WindowsSystem32driversetchosts

        [computer with wordpress IP address in the local network] www.website.com
    
    

    but in this i need to change the ip address for the server if i want to access the wordpress every time the ip changed and i can’t access another web in the server if i don’t add another virtualhost, is there a better way than this?

  2. Try these:

    define('WP_SITEURL', 'http://' . $_SERVER['HTTP_HOST'] . '/yoursite/');
    define('WP_HOME', 'http://' . $_SERVER['HTTP_HOST'] . '/yoursite/');
    

Comments are closed.