how to install wordpress HyperDB

The theory behind how HyperDB and such plugins work is that they use a simple calculation on the blog number to allocate a DB for it at creation time, and access it later. I am not sure what exactly happens when you need do add a new DB server, you will either need to look … Read more

WordPress Multisites or Multiple WP Single sites?

Rather than post this as a bunch of comments, I’m going to make this an answer. Your requirements/questions: to Have a Super admin that has access across all wp sites. That’s a hallmark of Multisite. to use both, subdomains and subfolders, in the chosen setup (see example above). You can accomplish this with something like … Read more

Is HyperDB supposed to be able to handle read-only (only) database instances?

I just came across a similar issue. The problem was that the theme was updating options on the ‘init’ action hook. function theme_setup() { update_option(‘thumbnail_size_w’, 170); update_option(‘medium_size_w’, 470); update_option(‘large_size_w’, 970); } add_action(‘init’, ‘theme_setup’); That is called on every page load. This is better done using the ‘after_switch_theme’ action hook which only takes place when the … Read more

Split WP_POST table based on post types

You could filter ‘query’ (you get the complete SQL here) and search for the post type in that. Then switch the database depending on what you found. But I don’t think this would work well: You might end up with the same post ID used multiple times (in each DB) and some strange side effects … Read more