How multi-user blog woblog realizes multi-user unified data table

rate:
0
(0user)

woblog is modified and optimized from wordpress. As we all know, the multi-user and multi-sites of wordpress are based on each site having its own independent data table, and each sub-site is actually an independent small blog. Although this may have a certain degree of convenience and efficiency in some respects, it is indeed a disaster when the number of users and the number of sites is large. Because every new site needs to create 10 tables, our blog_id is 2, that is, the second blog, then check the mysql database, you will find that there are 10 tables corresponding to this blog, namely: wp_2_commentmeta, wp_2_comments, wp_2_links, wp_2_options, wp_2_postmeta, wp_2_posts, wp_2_term_relationships, wp_2_term_taxonomy, wp_2_termmeta, wp_2_terms. Where wp is the table prefix and 2 is blog_id. If there are more users and sites, the number of data tables will be very huge. In addition, all content is scattered in multiple data tables, and the content cannot be aggregated.

Woblog is designed to address the above problems. Change the blog_id representing the blog id from the table name to add a field to the table, and modify all database-related codes, and finally use a set of data tables to store all the data .

This article is an original article, please indicate the source for reproduced!

Register or verify your account before rate!

admin:系统自动奖励,+10,  admin:系统自动奖励,+10,  

Leave a Reply