How to get the main blog’s id and db prefix from a mu plugin?

Use the constant BLOG_ID_CURRENT_SITE. And to get the database table prefix, use;

$main_blog_prefix = $wpdb->get_blog_prefix(BLOG_ID_CURRENT_SITE);

Leave a Comment

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)