I know it’s been asked before, how to use one connections DB across a multisite.
I found a pretty good, though not ideal, way to do this today.
On line 254 of connections.php Change
$prefix = ( is_multisite() && CN_MULTISITE_ENABLED ) ? $wpdb->prefix : $wpdb->base_prefix;
$prefix = "wp_";
This assumes two things.
- You change the prefix to match your first sites prefix. (wp_ in my case)
- You don’t update Connections, or if you do, you make the same change.
Presumably this could be built into connections as a dropdown that lists the prefix for all multisites to choose from. I know there’s a blog ID, and name, not sure off hand if it’s the same used in the prefixes or not.
- The topic ‘Using One Connections DB across an entire Multisite’ is closed to new replies.