Network Settings')); include('./admin-header.php'); /* This option panel does not save data to the options table. It contains a multi-step process allowing the user to enable a network of WordPress sites. */ $dirs = array( substr( ABSPATH, 0, -1), ABSPATH . "wp-content" ); ?>

Server Summary"; print "

If you post a message to the WordPress support forum at http://wordpress.org/support/ then copy and paste the following information into your message:

"; print "
"; print "
ERROR: $err
"; clearstatcache(); $files = array( "htaccess.dist", ".htaccess" ); foreach ( (array) $files as $val ) { $stats = @stat( $val ); if( $stats ) { print "

$val

"; print "    uid/gid: " . $stats[ 'uid' ] . "/" . $stats[ 'gid' ] . "
\n"; print "    size: " . $stats[ 'size' ] . "
"; print "    perms: " . substr( sprintf('%o', fileperms( $val ) ), -4 ) . "
"; print "    readable: "; print is_readable( $val ) == true ? "yes" : "no"; print "
"; print "    writeable: "; print is_writeable( $val ) == true ? "yes" : "no"; print "
"; } elseif( file_exists( $val ) == false ) { print "

$val

"; print "    FILE NOT FOUND: $val
"; } } print "
"; } function step2_htaccess() { global $base; // remove ending slash from $base and $url $htaccess = ''; if( substr($base, -1 ) == '/') { $base = substr($base, 0, -1); } $htaccess_sample = ABSPATH . 'wp-admin/includes/htaccess.ms'; if ( !file_exists( $htaccess_sample ) ) wp_die("Sorry, I need a {$htaccess_sample} to work from. Please re-upload this file to your WordPress installation."); $htaccess_file = file( $htaccess_sample ); $fp = @fopen( $htaccess_sample, "r" ); if( $fp ) { while( !feof( $fp ) ) { $htaccess .= fgets( $fp, 4096 ); } fclose( $fp ); $htaccess_file = str_replace( "BASE", $base, $htaccess ); } else { wp_die("Sorry, I need to be able to read {$htaccess_sample}. Please check the permissions on this file."); } //@todo: check for super-cache in use ?>
  • Replace the contents of your .htaccess with the following:

  • Installing Network of WordPress Sites

    I will help you enable the features for creating a network of sites by asking you a few questions so that you can create configuration files and make a directory to store all your uploaded files.

    What do I need?

    If the mod_rewrite module is disabled ask your administrator to enable that module, or look at the Apache documentation or elsewhere for help setting it up.

    "; if( function_exists( "apache_get_modules" ) ) { $modules = apache_get_modules(); if( in_array( "mod_rewrite", $modules ) == false ) { echo "

    Warning! It looks like mod_rewrite is not installed.

    " . $mod_rewrite_msg; } else { $rewrite_enabled = true; } } else { ?>

    Please make sure mod_rewrite is installed as it will be activated at the end of this install.

    Site Addresses

    Please choose whether you would like sites in your WordPress install to use sub-domains or sub-directories. You can not change this later.

    Note It looks like mod_rewrite is not installed.


    Server Address

    Server Address

    What is the Internet address of your site? You should enter the shortest address possible. For example, use example.com instead of www.example.com but if you are going to use an address like blogs.example.com then enter that unaltered in the box below.

    Do not use an IP address (like 127.0.0.1) or a single word hostname like localhost as your server address, use localhost.localdomain instead.

    Site Details

    Site Title
    What would you like to call your site?
    Email
    Your email address.

    Enabling WordPress Sites

    Complete the following steps to enable the features for creating a network of sites. Note: We recommend you make a backup copy of your existing wp-config.php and .htaccess files.

    1. Create a blogs.dir directory in your wp-content directory. This directory is used to stored uploaded media for your additional sites and must be writeable by the web server.
    base_prefix; $config_sample = ABSPATH . 'wp-admin/includes/wp-config.ms'; if ( !file_exists( $config_sample ) ) wp_die("Sorry, I need a {$config_sample} to work from. Please re-upload this file to your WordPress installation."); $wp_config_file = file( $config_sample ); ?>
  • Replace the contents of your wp-config.php with the following:

  • escape( $_POST[ 'basedomain' ] ); $domain = str_replace( 'http://', '', $domain ); if( substr( $domain, 0, 4 ) == 'www.' ) $domain = substr( $domain, 4 ); if( strpos( $domain, '/' ) ) $domain = substr( $domain, 0, strpos( $domain, '/' ) ); return $domain; } function nowww() { $nowww = str_replace( 'www.', '', $_POST[ 'basedomain' ] ); ?>

    No-www

    WordPress strips the string "www" from the URLs of sites using this software. It is still possible to visit your site using the "www" prefix with an address like but any links will not have the "www" prefix. They will instead point at .

    The preferred method of hosting sites is without the "www" prefix as it's more compact and simple.

    You can still use "" and URLs like "www.blog1." to address your site and blogs after installation but internal links will use the format.

    www. is depreciated has a lot more information on why 'www.' isn't needed any more.

    ' /> ' /> ' />