Multiple Database

Hello

I want to develop a website for university where it will have publications, videos, courses, blogs, etc post types, and I plan on using Custompress. My client request for multiple database for each section. Is it possible to have the database created automatically for every section/post type? I also thinking about using Multi-DB plugin, but I don't know how.. :slight_frown: I have a few months experience with wordpress, but still looking around for help.

Do you think it is wise to have multiple database for university website?

Thanks a bunch!

  • DavidM

    Hi ardentwire and first off, welcome to WPMU DEV!

    As with standard custom post types, CustomPress sort of just integrates with your standard WordPress database and doesn't create or utilize a separate database. That would actually involve a dramatic departure from the way that WordPress works, an extensive custom job that generally would not be needed.

    The plugin does store its settings in its database tables that are relatively easy to find though (ct_custom_post_types, ct_taxonomies, etc).

    If you really do require the use of multiple databases, the only way I could think of would be to create a separate WordPress site for each section, which is quite a lot of work itself. namely in maintenance. But it can be done.

    If you're going to go that route, you can use the User Synchronization plugin to sync user accounts between those sites.
    https://premium.wpmudev.org/project/wordpress-user-synchronization

    However, it really is much simpler having everything contained in a single installation and generally that's the preferred route.

    Also, Multi-DB would only be of use if you're utilizing the Multisite feature of WordPress, and that only if you've got, or plan to have, more than 500+ sites on your network.

    -David

  • ardentwire

    Thank you for your reply David.

    Personally, I also prefer using single database. It would be easier to create, custom, etc. Not only for me to develop, it would be easier for their IT stuff to understand and maintain it. Say one day their IT stuff quit, or got a new IT person, I imagine the manual that I gave them is the only reference he/she can use to learn, understand and maintain the website. In long run, I also guessing that if using multiple database like they asked, which you say is possible, there might be a big headache everytime the new version of Wordpress is available for update.

    My client's concern is, in the next few years, all blogs, pages, users, posts etc will be increasing. They asked whether using single database, where everything kept in it, will make the website slower. They imagine with so many things put together in one place, it will be a bit slower to get response. What do you think?

    - S

  • troykd

    You need to look at future anticipated demand. If it's less than 5k sites (free or paid), I'd go single multi site install. If you think it's going to take off, get multi-db set up and running. I went multi-db from the beginning because I'd rather deal with problems setting it up now without any subscribers and not when I've got paid subscribers and they are ticked off cause the system goes down due to a change to multi-db. I'm still setting it up so I'm no expert.

  • DavidM

    Yep, as troykd's saying, you wouldn't need Multi-DB unless you'll have a lot of sites on that network. If you know you'll have a lot of sites there, it'd be easier to set up Multi-DB now, basically planning ahead.

    I think you're right though, ardentwire, with everything in the same database it would become slower, which is where Multi-DB comes in.

    It really just depends on how many sites will be on the network and/or how fast it'll get up to those high numbers of sites.

    -David

  • ardentwire

    Honestly I've never developed any wordpress multisite, so I prefer working around single wordpress installation. But since I've been asked about multiple database, I think it would be a good start for me to familiarise myself with multisite. Can someone give me link to any good tutorial/article/blog that is good for wordpress multisite first timer like me. I dont know where to start.. :'(

    So David, do u think it's ok ok to have Multi-DB installed while the network only have less than 10 sites? The site would still be running like usual if I got 16 or 256 databases setup, right?

    It allows you to split your single database into 16, 256 or 4096 database - and if you are using cPanel, even incorporates a script that will do that for you.

    After that it'll distribute your blogs around the databases evenly - giving you peace of mind, much better performance and the confidence to grow your site as much as you desire!

  • Timothy Bowers

    Hey there! :slight_smile:

    Just checking in to see how things are going. :slight_smile:

    You should enable multisite first, multi-db is for an MU install

    Anyway as we haven't heard form you on this in a while. So I'm going to presume your all fixed up now and don't need any further assistance.

    However if you have more questions or need some more help then please feel free to respond in this thread or create a new one and we will be more than happy to offer assistance. :slight_smile:

    Take care.

Thank NAME, for their help.

Let NAME know exactly why they deserved these points.

Gift a custom amount of points.