Delicious Brains Publishes In-depth Guides on The WordPress Database

Delicious Brains, the creators of WP Migrate DB, published a guide that walks developers through the WordPress database. The guide describes every database table and there associated columns within WordPress single site. It also features an entity relationship diagram that explains the relationships between the various tables. Although the image was created for WordPress 3.8, it’s still accurate.

For those who want to learn the database structure of WordPress Multisite, check out their Multisite database tour as there are some key database changes to take note of:

When a WordPress site is converted to a Multisite install, a “network” of subsites is created. The existing site is converted to the first subsite in the network. The database classes the network itself as a site (wp_site), and each subsite as a blog (wp_blogs).

Certain tables are used only by a subsite, and a new set of tables are created every time a site is added to the network. Each set of tables is differentiated by the blog_id for the subsite used in the table prefix. e.g. `wp_2_posts`.

I encourage you to bookmark both guides as they’re excellent resources.

Would you like to write for WP Tavern? We are always accepting guest posts from the community and are looking for new contributors. Get in touch with us and let's discuss your ideas.

3 Comments


  1. “their associated columns” – not “there associated columns”

    thank you for taking time to write the article – greatly appreciated

    Fat Craig
    Brisbane, Australia

    Report


  2. If you’re interested in this kind of stuff, Jake Goldman (full disclosure: I work at 10up) gave a great talk on the IA of WordPress at WCPHX13. Super interesting to examine the history of the schema.

    Report


  3. I had a quick view of the article and got a question. How it differs from this – http://codex.wordpress.org/Database_Description ? Yes, some brief explanations of the tables purpose, possibly for newbies. But I tend to be sure those who started to learn the WP database interiors are already familiar with some basic concepts and don’t really need this. Codex article is pretty self explanatory and contains more useful information, like the types of database fields and their length, for example.

    Report

Comments are closed.