HyperDB support
-
Hello,
on my multisite install I’m using HyperDB to split sites to separate databases. My setup is pretty basic, each 100 sites have it’s own db.$wpdb->add_callback('prefix_multisite_tables'); function prefix_multisite_tables($query, $wpdb) { // Multisite blog tables are "{$base_prefix}{$blog_id}_*" if ( preg_match("/^{$wpdb->base_prefix}(\d+)_/i", $wpdb->table,$matches) ) { if (isset($matches[1])) { $db_id = intval($matches[1] / 100); if ($db_id) { return 'prefix_' . $db_id; } } } }
When I try to duplicate site, I get “Table not found…” error. What I have to do now is copy the site tables to the main db, and add a condition for the site I’m duplicating and the new site, like:
if(isset($matches[1]) && $matches[1] != 123 && $matches[1] != 925)
Any chance to support HyperDB natively?
Viewing 4 replies - 1 through 4 (of 4 total)
Viewing 4 replies - 1 through 4 (of 4 total)
- The topic ‘HyperDB support’ is closed to new replies.