Hi, I'm researching whether the following scenario can be done in WPMU with plugins and/or hacks.
It's a multiple-database setup with a twist. We have MySQL database servers named db01.myserver.net, db02.myserver.net, and so on. There's going to be only one main WPMU installation, but many blog sub-accounts. Initially, only db01.myserver.net will be used for all these blogs. But as soon as db01.myserver.net's hard drive becomes full, db02.myserver.net will be used next, and all subsequent blog accounts will be stored in db02.myserver.net. Then when db02.myserver.net becomes full, db03.myserver.net will be used next, and so on.
Can this be done in WPMU using plugins and/or hacks? But I prefer using plugins alone, if possible.
I wrestled with hacking my WPMU config files, creating symbolic links, and even editing wpmu-settings.php. I tried both Subdomain and Subdirectory modes of installation, but I failed to produce the setup I want (although Subdirectory mode looked promising).
But I think one of the key ideas here is that all the databases must have a copy of the admin's tables and data. These are the admin's tables:
wp_blog_versions
wp_blogs
wp_registration_log
wp_signups
wp_site
wp_sitecategories
wp_sitemeta
wp_usermeta
wp_users
wp_1_comments
wp_1_links
wp_1_options
wp_1_postmeta
wp_1_posts
wp_1_term_relationships
wp_1_term_taxonomy
wp_1_terms
Some of the tables have a "wp_1_" prefix. The "1" there is is the admin's numeric user ID, the value in the field wp_users.ID. The user with an ID of 75 has tables with the "wp_1_" prefix.
But if db01.myserver.net can only accommodate up to user #99, then user #100 will be stored in the next available server db02.myserver.net. So when user #100 gets registered, the tables in db02.myserver.net will be:
wp_blog_versions
wp_blogs
wp_registration_log
wp_signups
wp_site
wp_sitecategories
wp_sitemeta
wp_usermeta
wp_users
wp_100_comments
wp_100_links
wp_100_options
wp_100_postmeta
wp_100_posts
wp_100_term_relationships
wp_100_term_taxonomy
wp_100_terms
The tables without numeric prefixes are the admin's tables.
So is this really possible with WPMU? What action hooks should I override in my plugin? Or should I hack/modify WPMU itself?