diff --git a/src/wp-admin/includes/class-wp-importer.php b/src/wp-admin/includes/class-wp-importer.php index 408fe1bc04..794fa5cf0d 100644 --- a/src/wp-admin/includes/class-wp-importer.php +++ b/src/wp-admin/includes/class-wp-importer.php @@ -136,13 +136,15 @@ class WP_Importer { fwrite( STDERR, "Error: can not determine blog_id from $blog_id\n" ); exit(); } - if ( empty( $parsed['path'] ) ) + if ( empty( $parsed['path'] ) ) { $parsed['path'] = '/'; - $blog = get_blog_details( array( 'domain' => $parsed['host'], 'path' => $parsed['path'] ) ); - if ( !$blog ) { + } + $blogs = get_sites( array( 'domain' => $parsed['host'], 'number' => 1, 'path' => $parsed['path'] ) ); + if ( ! $blogs ) { fwrite( STDERR, "Error: Could not find blog\n" ); exit(); } + $blog = array_shift( $blogs ); $blog_id = (int) $blog->blog_id; }