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

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

Automatic switch to backup database on fail

HyperDB is awesome. You shouldn’t worry about its dev date (which by the way, its being done by Automattic – the team behind WordPress). HyperDB has some bigger advantages like spreading read/writes across servers and splitting them and its mostly used for such purposes (bigger scales). In your case, I would go for a VIP … 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

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