我能找到一个合适的工作。因为我删除了所有没有用户交互的博客。我创建了两个mysql查询并运行了它们。第一种方法是删除与给定$blog_id
第二个是从wp_blogs
桌子
$blogs = wp_get_sites( array(\'limit\' => 0) );
array_shift($blogs); # removes first blog from the list
global $wpdb;
foreach ( $blogs as $blog ) {
$blog_id = $blog[\'blog_id\'];
$query = "DROP TABLES ";
$query = "wp_{$blog_id}_commentmeta, ";
$query = "wp_{$blog_id}_comments, ";
$query = "wp_{$blog_id}_links, ";
$query = "wp_{$blog_id}_options, ";
$query = "wp_{$blog_id}_postmeta, ";
$query = "wp_{$blog_id}_posts, ";
$query = "wp_{$blog_id}_term_relationships, ";
$query = "wp_{$blog_id}_term_taxonomy, ";
$query = "wp_{$blog_id}_terms, ";
$wpdb->query( $query );
$wpdb->delete(\'wp_blogs\', array( \'blog_id\' => $blog_id ), array( \'%d\' ) );
}