Plugins which add tables to database

Hy guys I hope that you are all well.

I stumbled on this thread Step by Step Multi DB Installation guide

Mindful of Andrew’s answer half way down the post (which I quote)

Yep. You need to add all global tables for installed plugins to db-config.php prior to enabling Multi-DB. When installing new plugins be sure to add the global tables to db-config.php prior to adding in the plugin files.

…I have a question:

As part of the Premium subscription with WPMUDEV, what are the plugins that need a global database?

Thank you for your support.

Regards, thefixer

  • Jack Kitterhing
    • Code Norris

    Hi there @thefixer,

    Hope you’re well today and thanks for your question.

    I don’t believe that information is the same with the latest versions of Multi-DB, that used to be required for when adding a plugin, as the database tables wouldn’t be created.

    But now the database tables should be created automatically and the database tables etc are distributed across the databases and the VIP blogs have their own database :slight_smile:

    There should only be one global database within the db-config.php :slight_smile:

    I’ll also flag the lead developer to provide his valuable input here.

    Thanks!

    Kind Regards

    Jack

  • thefixer
    • Site Builder, Child of Zeus

    Jack, thank you. Yes, there is one global db in the db-config.php and that shows all global tables.

    The question was about whether I should manually add new global tables as and when new plugins need global tables in the database.

    I look forward for the developer input on this.

    Thank you for escalating this. Regards, thefixer

  • thefixer
    • Site Builder, Child of Zeus

    Eugene, thank you for your quick reply.

    I want to install Support System plugin, which asks me to add global tables to the db-config file.

    Could you please confirm this is not needed?

    This leads me to another, and last, question. A little history first

    I have installed multi-db (16db) successfully: I can see 16 databases + the global db and the original db in phpmyadmin

    I have installed buddypress as a secondary blog, whose tables appears in the global database along with other newly created sites. Happy days!

    However, there are not tables in the 16 newly created databases.Is this normal?

    Finally, I have just realised that I did not edit Line 25 as requested in the Multi-DB tutorial

    I have edited line 25 now, however I am not sure what impact this would have on the whole Multi-db installation and network performance.

    Do you suggest me to re-install Multi-DB form scratch?

    Thank you for your support.

    regards, the fixer.

  • Eugene Manuilov
    • Syntax Hero

    Could you please confirm this is not needed?

    In general the plugin has to recognize those tables as global, however you can add it as requested, just to be confirmed that everything goes well.

    However, there are not tables in the 16 newly created databases.Is this normal?

    Yes, it is. Don’t worry about it, because when a plugin creates global table, it will be created in the global database. If a plugin creates blog-level table, then it will be created in according database.

    Do you suggest me to re-install Multi-DB form scratch?

    Nope, you don’t need it.

  • thefixer
    • Site Builder, Child of Zeus

    Example from db.php file

    // setup the list of known global database tables

    add_global_table( ‘blogs’ );

    add_global_table( ‘blog_versions’ );

    require_once WP_CONTENT_DIR . ‘/db-config.php’;

    Thank you for clarifying this. Enjoy your day.

    Regards, thefixer

  • thefixer
    • Site Builder, Child of Zeus

    Eugene, as per your reply above

    In general the plugin has to recognize those tables as global, however you can add it as requested, just to be confirmed that everything goes well.

    Does the multi-db plugin takes care of this, for sure?

    I ask this as I have hundreds of plugins to install. Checking whether they add global tables to the db or not is not always easy to find out – as they might not have the sql.txt file.

    OR

    do you recommend multi-db users – like me – to find out whether any plugins add global tables before installing them and to manually add the global tables to the db-config.php and db-php?

    Thank yo for your support.

    Regards, thefixer

  • thefixer
    • Site Builder, Child of Zeus

    Eugene

    The plugin recognizes where a table is located and connects to appropriate database. So you don’t need to add global table if a table uses standard WordPress database prefix. If it doesn’t, then you need to add it.

    I am sorry this is not clear.

    What do I have to do to make sure that the necessary tables are added to db-config.php and db.php?

    Thank you for clarifying this to me

    regards, thefixer

Thank NAME, for their help.

Let NAME know exactly why they deserved these points.

Gift a custom amount of points.