This page redirects to an external site: https://developer.wordpress.org/reference/functions/get_id_from_blogname/
Given a blog's (subdomain or directory) name, retrieve it's id.
<code style="color: #000000"><span style="color: #0000BB"><?php get_id_from_blogname</span><span style="color: #007700">( </span><span style="color: #0000BB">$slug </span><span style="color: #007700">) </span><span style="color: #0000BB">?></span></code>
Getting the the id of a blog by name ($slug)
$slug = 'first-site'; $id = get_id_from_blogname($slug);
Switching blogs based on the blogs name ($slug)
$slug = 'another-site'; $id = get_id_from_blogname($slug); switch_to_blog($id); // do great things restore_current_blog();
Since: 3.0.0
get_id_from_blogname() is located in wp-includes/ms-blogs.php