Database structure

Posted by Andrea under Basics

WordPressMU creates the following tables upon installation:

wp_1_categories
wp_1_comments
wp_1_link2cat
wp_1_links
wp_1_options
wp_1_post2cat
wp_1_postmeta
wp_1_posts
wp_blogs
wp_blog_versions
wp_registration_log
wp_signups
wp_site
wp_sitecategories
wp_sitemeta
wp_usermeta
wp_users

A quick read will show that all table with the prefix wp_1_ will be associated to the blog with id #1. When a second blog is added to the system, those tables will be called wp_2_ , and so on with each blog created. Yes, 8 tables per blog will be added to the database. There has been some debate about whether the blog-specific table should be in one table, but ultimately it still stores the same amount of data.

This is just one reason why MU is not suited for installation on shared servers. Typically, the MySQL connection setting will be lowered. Also, phpMyAdmin (used to access the database on many shared servers)  has a difficult time dealing with very large database, specifically when doing backups.

Later, we’ll look at each table and what is stored there.

6 Responses to “Database structure”

  1. Akshay Surve Says:

    Eagerly awaiting your next post. ;)

  2. Administrative Faculty Theme » WPMu Tutorials (Week 2) Says:

    [...] Database structure is one of the key difference between WP and WPMU, and this post offers an overview of the WPMu database structure quite nicely. With a promise of more discussion to come. [...]

  3. WPMU Tutorials » Database structure - updated for 1.3 Says:

    [...] an addendum to this post, there’s a few extra tables in WPMU 1.3, which should officially be released any day [...]

  4. gulflee Says:

    hi i had install plugins next gen gallery but i want the plugins auto active then i install plugins commander, i did active but but some table that the plugin need didnot add auto-ly how ? tq

  5. Importing a single WP blog to a WPMu Installation at bavatuesdays Says:

    [...] WPMu Tutorials site has two posts about the basic structure of the WPMu database. It is a useful overview that explains how the [...]

  6. Terni Says:

    I’ve just found Wordpress MU because it seems it’s not much published by Wordpress guys themselves.
    Anyway, since I’m an ASP coder, and I don’t know much about PHP, I thank you for this site wich is very precious to us.
    I’ve seen last post is on June, 21 please don’t stop to carry on this blog. It’s awesome idea and I’m confident WPMU will become soon much more popular and so this blog will increase in users very quickly.
    Thanks again

Leave a Reply

*
To prove you're a person (not a spam script), type the security word shown in the picture.
Anti-Spam Image



google.load("language", "1"); var curstate = 0; var hasloaded = 0; function bnc_show_translated() { if (hasloaded == 0) { bnc_lang_callback(); hasloaded = 1; } for (i = 0; i < 6; i++) { var elem = $("bnc_original_" + i); if (elem) { if (curstate) { elem.show(); } else { elem.hide(); } } } for (i = 0; i < 6; i++) { var elem = $("bnc_trans_" + i); if (elem) { if (curstate) { elem.hide(); } else { elem.show(); } } } if (curstate) { $("bnc_trans_state1").show(); $("bnc_trans_state2").hide(); curstate = 0; } else { $("bnc_trans_state1").hide(); $("bnc_trans_state2").show(); curstate = 1; } } function bnc_detect_div(div_id) { var text = document.getElementById(div_id); if (text) { text = text.innerHTML; if (text.length > 0) { google.language.detect(text, function(result) { if (!result.error) { if (result.language != "en") { if (result.confidence > 0.25) { $("bnc_translating").show(); bnc_xlate_div(result.language, div_id, "en"); } } } } ); } } } function bnc_xlate_div(src_lang,div_id,o_lang) { var text = document.getElementById(div_id); if (text) { text = text.innerHTML; google.language.translate(text, src_lang, o_lang, function(result) { var translated = document.getElementById(div_id); if (result.translation) { translated.innerHTML = result.translation; } }); } } function bnc_lang_callback() { bnc_xlate_div("en", "bnc_lang_i_0_23", "en"); bnc_xlate_div("en", "bnc_lang_i_1_23", "en"); bnc_xlate_div("en", "bnc_lang_i_2_23", "en"); bnc_xlate_div("en", "bnc_lang_i_3_23", "en"); bnc_xlate_div("en", "bnc_lang_i_4_23", "en"); bnc_xlate_div("en", "bnc_lang_i_5_23", "en"); bnc_xlate_div("en", "bnc_lang_i_6_23", "en"); bnc_xlate_div("en", "bnc_lang_i_7_23", "en"); bnc_xlate_div("en", "bnc_lang_i_8_23", "en"); } function bnc_startup() { bnc_xlate_div("en", "bnc_translate_info", "en"); bnc_xlate_div("en", "bnc_translate_info2", "en"); bnc_detect_div("bnc_lang_i_0_23");bnc_detect_div("bnc_lang_i_1_23");bnc_detect_div("bnc_lang_i_2_23");bnc_detect_div("bnc_lang_i_3_23");bnc_detect_div("bnc_lang_i_4_23");bnc_detect_div("bnc_lang_i_5_23");bnc_detect_div("bnc_lang_i_6_23");bnc_detect_div("bnc_lang_i_7_23");bnc_detect_div("bnc_lang_i_8_23"); } google.setOnLoadCallback(bnc_startup);
Close
E-mail It
This blog has been fine-tuned with 13 WordPress Tweaks.