WordPress Multisite database tables explained

Share it

Working with a WordPress Multisite requires a little bit more knowledge about WordPress and experience as WordPress admin than working with a single site. When you try to fix problems

Working with a WordPress Multisite requires a little bit more knowledge about WordPress and experience as WordPress admin than working with a single site. When you try to fix problems with your WordPress Multisite network, it is sometimes helpful to know how the database of a multisite is structured and what the differences between a Single Site database and a WordPress Multisite database are.

So let’s take a look to which database tables do we have in a single site and which we have in a multisite. We will briefly explain each of the multisite specific tables. If you need an explanation of single site tables, please read the post Database Description in the WordPress Codex.

Hint: Starting from a single site WordPress installation it is possible to switch to a WordPress Multisite through a procedure as described in the WordPress codex.

WordPress single site database tables

In a single site WordPress installation the database tables used are:

After we proceed with the Multisite install procedure, some of these tables are updated and other new tables are added. The remaining ones are not changed but they start to refer to the main site, while for other sites (not the main) specific ones are created.

WordPress Multisite database tables

So here the new situation after a Multisite install:

New tables

Updated tables

Site Specific Tables

The data of the main site is stored in existing unnumbered tables, while the data of additional sites is stored in new numbered tables.

So for the main site we have these dedicated tables:

While, for example, when a new site is created, the site-specific tables, similar to the single site install, are created. Each set of tables for a site is created with the site ID (blog_id) as part of the table name. These are the tables that would be created for site with ID 2 :

References:

https://codex.wordpress.org/Database_Description

https://deliciousbrains.com/wordpress-multisite-database-tour/

https://rudrastyh.com/wordpress-multisite/database-tutorial.html

 

 

Share it
Inpsyde
Privacy Overview

This website uses cookies so that we can provide you with the best user experience possible. Cookie information is stored in your browser and performs functions such as recognising you when you return to our website and helping our team to understand which sections of the website you find most interesting and useful.