简体   繁体   English

如何将庞大的WordPress多站点数据库分解为单独的MySQL数据库?

[英]How do I break a huge WordPress multi-site database up into separate MySQL databases?

How do I break a huge WordPress multi-site database up into separate MySQL databases? 如何将庞大的WordPress多站点数据库分解为单独的MySQL数据库? I have 24 WordPress MU-or- multi-site sites, holding over 20K users in total. 我有24个WordPress MU或多站点网站,总共拥有超过2万名用户。 My Server says I must break them into smaller or separate databases But I am at a loss as to how this is accomplished ? 我的服务器说必须将它们分成较小的数据库或单独的数据库,但是我对如何完成此操作感到迷惑? I seem to remember somewhere in the original install a option setting asking if wp should use separate data bases True or False and it was set to false by default ? 我似乎记得在原始安装的某处有一个选项设置,询问wp是否应使用单独的数据库True或False,并且默认情况下将其设置为false? but Now I can't seem to find it? 但现在似乎找不到了吗?

To do this you'll have to have access to phpmyadmin or a friend who is comfortable with mysql. 为此,您必须有权访问phpmyadmin或对mysql熟悉的朋友。 Also, make sure to back up your database before you begin. 另外,请确保在开始之前备份数据库。

If you have a look in the database you'll see that each table has a wp_(blog index number)_tablename. 如果查看数据库,您会发现每个表都有一个wp_(博客索引号)_tablename。 (ie wp_1_content...) (即wp_1_content ...)

In a regular installation all you have is the wp_tablename. 在常规安装中,您所拥有的只是wp_tablename。

What you want to do is export each set of tables per index (ie wp_1_content...) and rename the tables to only include wp_tablename (ie wp_content) 您要做的是按索引导出每组表(即wp_1_content ...),并将表重命名为仅包含wp_tablename(即wp_content)

Also, don't forget to change the url values in the wp_options table. 另外,不要忘记更改wp_options表中的url值。 There may be some other mu specific settings that you'll need to change in the mother site. 您可能需要在母网站上更改其他特定于亩的设置。

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

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