Forum Replies Created

Viewing 5 replies - 31 through 35 (of 35 total)
  • @tp22 hi, i wrote you in mail for this, please let me know if you can help me in this , i can pay for this

    @tp22
    it shows a critical error, here is my configuration but I have no idea how to make partitioning work on a round-robin basis for multiple databases. can you help me with this?
    for example, I run a multisite network with version 5.7.2, and have 100+ databases and want to partitions the data like when a new blog is created it should automatically sit in a database and the next blog in the next database and so on . or any suggestions for better performance since in run woocommerce in it which is resource-intensive

    $wpdb->add_database(array(
    ‘host’ => ‘localhost’,
    ‘user’ => ‘new user’,
    ‘password’ => ‘password’,
    ‘name’ => ‘new database’,
    ));
    $wpdb->add_database(array(
    ‘host’ => ‘localhost’,
    ‘user’ => ‘newuser’,
    ‘password’ => ‘password’,
    ‘name’ => ‘new database’,
    ‘dataset’ => ‘set1’,
    ));
    $wpdb->add_callback(‘my_db_callback’);
    function my_db_callback($query, $wpdb) {
    // Multisite blog tables are “{$base_prefix}{$blog_id}_*”
    if ( preg_match(“/^{$wpdb->base_prefix}\d+_/i”, $wpdb->table) )
    return ‘set1’;
    }
    */`

    • This reply was modified 3 years, 6 months ago by Deepak.

    it shows a critical error, here is my configuration but I have no idea how to make partitioning work on a round-robin basis for multiple databases. can you help me with this?
    for example, i run a multisite network with version 5.7.2, and have 100+ databases and want to partitions the datas like when a new blog is created it should automatically sit in a database and the next blog in the next database and so on . or any suggestions for better performance since in run woocommerce in it which is resource-intensive

    $wpdb->add_database(array(
    ‘host’ => ‘localhost’,
    ‘user’ => ‘new user’,
    ‘password’ => ‘password’,
    ‘name’ => ‘new database’,
    ));
    $wpdb->add_database(array(
    ‘host’ => ‘localhost’,
    ‘user’ => ‘newuser’,
    ‘password’ => ‘password’,
    ‘name’ => ‘new database’,
    ‘dataset’ => ‘set1’,
    ));
    $wpdb->add_callback(‘my_db_callback’);
    function my_db_callback($query, $wpdb) {
    // Multisite blog tables are “{$base_prefix}{$blog_id}_*”
    if ( preg_match(“/^{$wpdb->base_prefix}\d+_/i”, $wpdb->table) )
    return ‘set1’;
    }
    */

    hi , I deleted the site, ill recreate it and send you errors very soon,
    btw it just showing wp default critical error page , not specifically mentioning others

    hi , im using wp 5.7.2 and getting criticalk error in my sit e, may i know is this works with the latest versions , and i would like to know what version you are using .

Viewing 5 replies - 31 through 35 (of 35 total)