简体   繁体   English

WordPress的多站点多数据库

[英]Wordpress Multisite MULTI DATABASE

I have recently discovered the multisite functionality of the wordpress core. 我最近发现了wordpress核心的多站点功能。 really exciting! 真的令人激动! After digging around some more, I noticed that the database simply replicates 9 tables each time we create a new subdomain; 深入研究之后,我注意到每次创建新的子域时,数据库仅复制9个表。 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. 我见过shardb和hyperdb,但实际上它们只是添加数据库来存储来自多个子域的表(至少这就是我的解释方式),以提高站点速度。

Im not concerned about site speed as much as I am security and redundency. 我对安全性和冗余性的关注程度不及我。

Any ideas? 有任何想法吗?

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. MultiSite的功能之一是所有WP实例都使用一个WP安装和一个数据库,只是具有不同的表。

In answer to your question, a plugin you could use for this is Multi DB https://premium.wpmudev.org/project/multi-db/ . 为了回答您的问题,您可以使用的插件是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. 尽管该插件不再受他们正式支持,但根据网站显示,它仍与WP 4.5.3兼容。

As for redundancy, you could run 2 linux VM's for hosting the databases, one a primary, one a failover 至于冗余,您可以运行2个Linux VM来托管数据库,一个是主数据库,一个是故障转移数据库。

If you've heard of EduBlogs (Like Wordpress.com, but for education), they host about 3 million blogs using Multisite. 如果您听说过EduBlogs(类似于Wordpress.com,但用于教育),则它们使用Multisite托管了约300万个博客。 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/ 它背后的人是WPMUDev(链接到上面),但是在这里他们为大量站点提供了有关多站点的详尽文章,以及您可能会遇到的潜在数据库问题: https : //premium.wpmudev.org/blog/ultimate-guide -多站点/

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM