Unfortunately, changing domain names in WordpressMU is a manual process. It’s something I’ve come across often and have to look it up each time. Here’s what I did, so I don’t have to look it up again. Original idea from Boris Masis.
1. Drop and run this script in the root wpmu directory:
<?php
define('WP_INSTALLING', true);
require_once('wp-load.php');
$old_domain = 'olddomain.com';
$new_domain = 'newdomain.com';
$query = "UPDATE wp_site SET domain = '$new_domain' where domain = '$old_domain'";
$wpdb->query($query);
$query = "UPDATE wp_blogs SET domain = REPLACE(domain, '$old_domain', '$new_domain')";
$wpdb->query($query);
$querystr ="SHOW TABLES LIKE 'wp_%_options'";
$tables = $wpdb->get_results($querystr, ARRAY_N);
echo count($tables);
$query = "";
if ($tables){
foreach ($tables as $table){
$query = 'UPDATE '.$table[0]." SET option_value = REPLACE(option_value,'$old_domain','$new_domain')";
$wpdb->query($query);
}
}
?>
2. Edit wp-config.php and set “DOMAIN_CURRENT_SITE” to the appropriate domain.
That’s it, everything should work properly.
Dan 11:15 am on September 21, 2009 Permalink |
Include the timezone with the time. Looking at the scheduled maintenance for the 15th is ambiguous on 2 counts:
Time Description
00:27:10 Site maintenance @7:10pm.
Oh, and no fail pets!
ozten 12:01 pm on September 21, 2009 Permalink |
This is going to be a really useful page!
Maybe give a place for someone to report an issue on a green site, that should be red? This would put them into bugzilla with the correct product/component?
If this site had optional LDAP authentication, it would be great to display links to our monitoring dashboards for logged in users, on a site by site basis. (so you can dig deeper and see DB health, etc)
Philipp 2:25 pm on September 21, 2009 Permalink |
developer.mozilla.org should be added, this seems to break quite often.
Stephen Donner 12:00 am on October 12, 2009 Permalink |
Jeremy, could it also include SVN revision #’s? Not all our pages/apps have it in the source (in fact, I think only AMO does), and this would really help QA and dev; thanks!
Stephen Donner 12:02 am on October 12, 2009 Permalink |
Also, can you add a Mozilla.com background? The white is a bit jarring