Justin Sellers
Justin Sellers

Reputation: 48

Wordpress Multisite MULTI DATABASE

I have recently discovered the multisite functionality of the wordpress core. really exciting! After digging around some more, I noticed that the database simply replicates 9 tables each time we create a new subdomain; but keeps them all in the same database.

The project I am in the planning stages for has a high amount of data information to be stored. The information that would be stored would be proprietary for each company that uses the site.

My question is this. How would I go about getting the entire database to replicate vs getting just a few tables to replicate? Basically, I am looking to create exact copies of the site over and over and over, but each site would have its own database. eventually, each copy of the site would be created once a customer has paid to use the service.

I have seen shardb and hyperdb, but they actually just add databases to store tables from multiple subdomains (at least thats how i interpretted it) to increase site speed.

Im not concerned about site speed as much as I am security and redundency.

Any ideas?

Upvotes: 2

Views: 9934

Answers (1)

AshboDev
AshboDev

Reputation: 370

One of the features of MultiSite is that all the WP instances use a single WP installation, and a single database, just with different tables.

In answer to your question, a plugin you could use for this is Multi DB https://premium.wpmudev.org/project/multi-db/. Although this plugin is no longer officially supported by them anymore, it's still compatible with WP 4.5.3 according to the site.

As for redundancy, you could run 2 linux VM's for hosting the databases, one a primary, one a failover

If you've heard of EduBlogs (Like Wordpress.com, but for education), they host about 3 million blogs using Multisite. The guys behind it are WPMUDev (Linked to above) but here they have a thorough article for Multisite for a large number of sites and the potential Database issues you may encounter: https://premium.wpmudev.org/blog/ultimate-guide-multisite/

Upvotes: 4

Related Questions