The MU forums have moved to WordPress.org

How to upgrade an old version of WPMU (1 post)

  1. Farms2
    Member
    Posted 18 years ago #

    So, pending getting a chance to test mrball's plugin, here's a quick 'how to' upgrade an old version of WPMU (one where 99% of files are in wp-inst) to a new one (where wp-inst doesn't exist).

    1. Back-up, lots :)

    2. Give yourself a couple of days for a site with over 10k users - allows for server slowdowns / bugs / it taking a bloody long time

    3. Let your users know what's going down.

    4. FTP the latest code into your root folder

    5. Get your server admin (I guess if you;re following this you're about as smart as me :) to copy wp-inst/wp-content/blogs.dir to wp-content/ (doing this through cPanel or by FTP frigs up the file ownership bits)

    6. Configure your new wp-config file and .htaccess file, my working ones look like this:

    RewriteEngine On
    RewriteBase /

    # Rewrite http://www.domain.com to domain.com
    RewriteCond %{HTTP_HOST} ^www\.(.*)
    RewriteRule ^(.*) http://%1/$1 [R,L]

    #uploaded files
    RewriteRule ^(.*)?/?files/(.*) wp-content/blogs.php?file=$2 [L]

    RewriteCond %{REQUEST_FILENAME} -f [OR]
    RewriteCond %{REQUEST_FILENAME} -d
    RewriteRule . - [L]
    RewriteRule ^([_0-9a-zA-Z-]+/)?(wp-.*) $2 [L]
    RewriteRule ^([_0-9a-zA-Z-]+/)?(.*\.php)$ $2 [L]
    RewriteRule . index.php [L]

    &

    <?php

    // ** MySQL settings ** //
    define('DB_NAME', 'wordpress'); // The name of the database
    define('DB_USER', 'username'); // Your MySQL username
    define('DB_PASSWORD', 'password'); // ...and password
    define('DB_HOST', 'localhost'); // 99% chance you won't need to change this value
    define('VHOST', 'yes');
    $base = '/';

    // double check $base
    if( $base == 'BASE' )
    die( 'Problem in wp-config.php - $base is set to BASE when it should be the path like "/" or "/blogs/"! Please fix it!' );

    // Change the prefix if you want to have multiple blogs in a single database.
    $table_prefix = 'wp_'; // example: 'wp_' or 'b2' or 'mylogin_'

    // Change this to localize WordPress. A corresponding MO file for the
    // chosen language must be installed to wp-includes/languages.
    // For example, install de.mo to wp-includes/languages and set WPLANG to 'de'
    // to enable German language support.
    define ('WPLANG', '');

    define( "WP_USE_MULTIPLE_DB", false );

    /* Stop editing */

    define('ABSPATH', dirname(__FILE__).'/');
    require_once(ABSPATH.'wp-settings.php');
    ?>

    7. Go login and call blogsite.org/wp-admin/upgrade.php

    8. Go to site admin > Upgrade site and sit tight!

    For me this has frequently got stuck at various points - from experience so far you've got to have a pretty well optimized SQL database, lots of patience and be willing to 'give it a few hours' if it stops working and try again... scientific huh :)

    9. Make sure that you point to wp-signup.php rather than wp-newblogs.php.

    10. Have a holiday!

    I think that's it, have I missed anything really important (this is ofteen the case so don't go following these instructions without checking for further comments below).

    Cheers, James

About this Topic

  • Started 18 years ago by Farms2