Take the 2-minute tour ×
WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. It's 100% free, no registration required.

I'm wondering what all the wp_2_*, wp_3_*, wp_4_*, and wp_5_* tables are in the database. Does anyone know what they are? Some of them in my example are from plugins, but what does the wp_# prefix mean? and why are there then duplicates for some of the core database tables?

mysql> show tables;
+-----------------------------+
| Tables_in_example           |
+-----------------------------+
| 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_terms                  |
| wp_3_commentmeta            |
| wp_3_comments               |
| wp_3_links                  |
| wp_3_options                |
| wp_3_postmeta               |
| wp_3_posts                  |
| wp_3_term_relationships     |
| wp_3_term_taxonomy          |
| wp_3_terms                  |
| wp_4_commentmeta            |
| wp_4_comments               |
| wp_4_contact_form_7         |
| wp_4_events                 |
| wp_4_events_categories      |
| wp_4_gwolle_gb_entries      |
| wp_4_gwolle_gb_log          |
| wp_4_links                  |
| wp_4_options                |
| wp_4_postmeta               |
| wp_4_posts                  |
| wp_4_quotescollection       |
| wp_4_term_relationships     |
| wp_4_term_taxonomy          |
| wp_4_terms                  |
| wp_5_commentmeta            |
| wp_5_comments               |
| wp_5_links                  |
| wp_5_options                |
| wp_5_postmeta               |
| wp_5_posts                  |
| wp_5_term_relationships     |
| wp_5_term_taxonomy          |
| wp_5_terms                  |
| wp_blog_versions            |
| wp_blogs                    |
| wp_commentmeta              |
| wp_comments                 |
| wp_domain_mapping           |
| wp_domain_mapping_logins    |
| wp_links                    |
| wp_options                  |
| wp_postmeta                 |
| wp_posts                    |
| wp_redirection_groups       |
| wp_redirection_items        |
| wp_redirection_logs         |
| wp_redirection_modules      |
| wp_registration_log         |
| wp_signups                  |
| wp_site                     |
| wp_sitemeta                 |
| wp_term_relationships       |
| wp_term_taxonomy            |
| wp_terms                    |
| wp_usermeta                 |
| wp_users                    |
| wp_woo_custom_nav_menus     |
| wp_woo_custom_nav_records   |
+-----------------------------+
67 rows in set (0.00 sec)
share|improve this question
add comment

1 Answer

up vote 6 down vote accepted

Those are from a multisite install. The numbers represent the blog_id and the tables are created when you add a new site to your network.

http://codex.wordpress.org/Database_Description#Multisite_Table_Details

http://codex.wordpress.org/Create_A_Network#Step_4:_Installing_a_Network

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.