WordPress.org

Ready to get started?Download WordPress

Forums

can not access from outside after enable the multi-site (2 posts)

  1. hundanterping
    Member
    Posted 3 years ago #

    I followed the steps on Create A Network
    I enable the mod-rewrite in my apache.
    I chose to do the Sub-directory sites, which seems a little bit easier.
    So I changed the configuration in my wp-config.php to be:

    define('WP_DEBUG', true);
    define('WP_ALLOW_MULTISITE', true);
    define( 'MULTISITE', true );
    define( 'SUBDOMAIN_INSTALL', false );
    $base = '/wordpress/';
    define( 'DOMAIN_CURRENT_SITE', 'localhost' );
    define( 'PATH_CURRENT_SITE', '/wordpress/' );
    define( 'SITE_ID_CURRENT_SITE', 1 );
    define( 'BLOG_ID_CURRENT_SITE', 1 );

    and add a .htaccess to be:

    # BEGIN WordPress
    RewriteEngine On
    RewriteBase /wordpress/
    RewriteRule ^index\.php$ - [L]
    
    # uploaded files
    RewriteRule ^([_0-9a-zA-Z-]+/)?files/(.+) wp-includes/ms-files.php?file=$2 [L]
    
    # add a trailing slash to /wp-admin
    RewriteRule ^([_0-9a-zA-Z-]+/)?wp-admin$ $1wp-admin/ [R=301,L]
    
    RewriteCond %{REQUEST_FILENAME} -f [OR]
    RewriteCond %{REQUEST_FILENAME} -d
    RewriteRule ^ - [L]
    RewriteRule  ^[_0-9a-zA-Z-]+/(wp-(content|admin|includes).*) $1 [L]
    RewriteRule  ^[_0-9a-zA-Z-]+/(.*\.php)$ $1 [L]
    RewriteRule . index.php [L]
    # END WordPress

    But after I did this, I found out I can no longer access the wordpress from the outside network, it's now only available on the localhost computer.

    Originally, I could try "twycc.dyndns.org/wordpress" or my ip "xxx.xxx.xxx.xxx/wordpress" to see the content.
    Now I cannot see the wordpress from the outside, but the rest of website under my root directory "C:\xampp\htdocs" works.

    I tried to change the configuration in wp-config.php to be:

    define('WP_DEBUG', true);
    define('WP_ALLOW_MULTISITE', true);

    then the outside network could see a website but with a messed up content(maybe the multi-site issue has already change the links of everything)

    Please tell me how to modify to have a working multi-site, thanks!!!!

  2. define( 'DOMAIN_CURRENT_SITE', 'localhost' );

    This is why. You just told it to be localhost. Put your domain name in there.

    If you had done this in the backend of WordPRess and not from some random tutorial somewhere, it would have your domain in it.

Topic Closed

This topic has been closed to new replies.

About this Topic