You can't run WPMU scripts from the command line without changing a core file.
If you want to do it :
Copy wp-config.php to wp-config2.php
Edit wp-config2.php and change require_once(ABSPATH.'wp-settings.php');
to require_once(ABSPATH.'wp-settings2.php');
Copy wp-settings.php to wp-settings2.php
Edit wp-settings2.php and change require_once ( ABSPATH . 'wpmu-settings.php' );
to require_once ( ABSPATH . 'wpmu-settings2.php' );
Copy wpmu-settings.php to wpmu-settings2.php
Edit wpmu-settings2.php
Find
if( $current_site && $current_blog == null ) {
if( $current_site->domain != $_SERVER[ 'HTTP_HOST' ] ) {
header( "Location: http://" . $current_site->domain . $current_site->path );
exit;
}
$current_blog = $wpdb->get_row( $wpdb->prepare("SELECT * FROM $wpdb->blogs WHERE domain = %s AND path = %s", $current_site->domain, $current_site->path) );
}
which is round line 166
Change it to:
if( $current_site && $current_blog == null ) {
#if( $current_site->domain != $_SERVER[ 'HTTP_HOST' ] ) {
# header( "Location: http://" . $current_site->domain . $current_site->path );
# exit;
#}
$current_blog = $wpdb->get_row( $wpdb->prepare("SELECT * FROM $wpdb->blogs WHERE domain = %s AND path = %s", $current_site->domain, $current_site->path) );
}
Then in the script you want to run you need to change the include line that says wp-config.php to wp-config2.php
Its a pain but it works.
I'm wondering if its worth working out a neater way to do it and putting something into trac