I recently updated my test server running this blog, and appsguy.com (and a few others) were not working. When going to the front page, Wordpress redirected in an infinite loop trying to create a new blog (wp-signup.php…..). It turns out that the wp_blogs table in the MySQL database was corrupt. The wp_blogs table is what identifies which blog should be displayed, and with what settings.
After an initial attempt to repair the table with MySQL failed, I tried a few things. What ended up working was to create a new blog, copy the table structure, then recreate the table. To save others the hassle, here is the table structure
Warning, table structure may have changed between Wordpress MU versions, this works for WordPress MU 2.8.1:
CREATE TABLE `wp_blogs` (
`blog_id` bigint(20) NOT NULL AUTO_INCREMENT,
`site_id` bigint(20) NOT NULL DEFAULT '0',
`domain` varchar(200) NOT NULL DEFAULT '',
`path` varchar(100) NOT NULL DEFAULT '',
`registered` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
`last_updated` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
`public` tinyint(2) NOT NULL DEFAULT '1',
`archived` enum('0','1') NOT NULL DEFAULT '0',
`mature` tinyint(2) NOT NULL DEFAULT '0',
`spam` tinyint(2) NOT NULL DEFAULT '0',
`deleted` tinyint(2) NOT NULL DEFAULT '0',
`lang_id` int(11) NOT NULL DEFAULT '0',
PRIMARY KEY (`blog_id`),
KEY `domain` (`domain`(50),`path`(5)),
KEY `lang_id` (`lang_id`)
) ENGINE=MyISAM AUTO_INCREMENT=2 DEFAULT CHARSET=utf8;
Then insert the data:
INSERT INTO `wp_blogs` VALUES (1,1,'appsguy.com','/',
'2011-07-22 20:24:57','2011-07-22 20:24:57',1,'0',0,0,0,0);
After reloading the site, the blog came up with the default theme. Since the theme files were intact, I went into the admin, switched the theme then the blog was back to normal.








