Multi-DB Doubt

Hi,

I'm planning to have about 100,000 blogs/sites for now, so I think it would better to create 256 databases.

If my project evolve, I will want to create more databases. Is it easy and recommended to change from 256 to 4096 databases in the future, when I have already thousands of blogs in the network?

What do you recommend?

Thanks.

  • Vaughan
    • Support/SLS MockingJay

    Hi @anderson,

    If you really expect to have about 100,000 blogs or more, then go for 4096. if not, then go for 256.

    I don't think it would be easy or possible to change this afterwards. It would take a lot of work to change once you've already configured it, which is why it mentions you need to decide this before proceeding.

    Hope this helps

  • Anderson
    • The Incredible Code Injector

    I have a new network with no blog. I have a dedicated host with disk space of 1TB, in which I host both the databases and the wp network. Is it required an extra capacity to have 4096 databases? Can I have all these databases in the same dedicated host as my wp network?

  • Vaughan
    • Support/SLS MockingJay

    Hi,

    It should work ok to begin with, but I would say scalability wise once you start getting near 100k blogs & so on, you might need to possibly start scaling between multiple servers, possibly using a seperate server for your DB than your website. by that stage though, you really should be looking into hiring a sysadmin due to the shear volume of sites & the maintenance that would require to maintain & keep online.

    I certainly wouldn't even want to be dealing with even a tenth of 100k blogs on my own.

    Hope this helps

  • Vaughan
    • Support/SLS MockingJay

    Hi @anderson,

    At least you're not afraid to admit when you're over your head. This plugin is definitely not for beginners and I would also advise against trying it if you don't understand what needs to be done. We don't say that very often, but in the plugin usage guide, we do make this clear for obvious reasons as you are finding out.

    I wouldn't like to attempt it myself with ssh as I really don't know enough about that side of things, it's not a service we actually offer here.

    But we do have a jobs board here where you could advertise, make the request detailed, and make the requirements detailed too, you don't want another beginner to be messing with either, you need a developer who is comfortable with SSH & Databases.

    https://premium.wpmudev.org/wordpress-development/

    Hope this helps

  • Vaughan
    • Support/SLS MockingJay

    Hi,

    To do both, it shouldn't take a competent developer who is familiar with SSH long at all, but SSH is not something for beginners to be messing with, especially with configuring something like multi-db. the problem with multi-db is it's complexity & when things go wrong, they go wrong badly. I Would do a complete backup of your DB & sites etc (CPanel backup if possible) before any attempts with multi-db, just in case things do go wrong. Backups should be a number 1 priority :slight_smile:

    Hope this helps

  • Anderson
    • The Incredible Code Injector

    Another doubt. In the Multi-DB usage page I see:

    "One final step is to make sure you have assigned a username and password to be associated with each database. This could be the same as your username and password for the original WordPress database. It’s up to you, just make sure that there IS a username and password associated with each one and note what it is. You’ll need this information for the next step."

    How to make it sure? I'll create 4096 databases with the script generated by https://premium.wpmudev.org/db-tools/db_sql.php

    How to know if all databases have username and password?

    Thanks.

  • Anderson
    • The Incredible Code Injector

    Sorry, I have no skills in databases....

    When I create the 4096 databases, I do not define the username and password, right?

    How to make it sure I have assigned a username and password to be associated with each database?

    Please, help.

  • Jack Kitterhing
    • Code Norris

    Hi there @Anderson,

    Hope you're well today! :slight_smile:

    Setting up databases is specialized and requires some knowledge of databases and your hosting environment.

    The link above just generates the SQL code to create your databases, it doesn't create the user or pass, you'll need to do this.

    That can be done from within PHPMYAdmin, if you have access to that or similar.

    Is this shared hosting or dedicated?

    I'd personally recommend hiring someone to setup multi-db for you and make sure everything works correctly, as Vaughan suggested you could try posting on the job board here https://premium.wpmudev.org/wordpress-development/

    We're more than happy to help, but if you haven't setup databases or database users before, I would recommend getting someone to do that for you. :slight_smile:

    Thank you!

    Kind Regards
    Jack.

Thank NAME, for their help.

Let NAME know exactly why they deserved these points.

Gift a custom amount of points.