Since WordPress is a dynamic PHP-based application, it requires a database to store all the important data. WordPress uses MySQL to manage database tables and it supports MySQL version 5.6 or greater and MariaDB version 10.1 or greater.
You can have a look at the below image to better understand the tables present in the database of a standard WordPress installation and how they are connected –
For an even better understanding, you may watch these videos below –
Explore the videos for insights and tutorials on Database Schema in Single and Multisite environments. This section comprises 4 modules with a combined duration of 39 minutes.
Or you can read more about WordPress Database Schema from the Database Description codex page.
Some things to consider:
postmeta
, commentmeta
, usermeta
all act as key-value stores for their respective object types.
new WP_Query()
automatically queries and caches post meta for use with get_post_meta().wp_options
is also key-value store, but for the entire site. These are autoloaded and cached in memory by default, unless autoload
is set to false
using add_option().term_relationships
, term_taxonomy
, terms
, and termmeta
work together to provide abstract normalized relationships. Term meta usually has no user interface, except with plugins such as Category and Term Meta Fields, Advanced Custom Fields, or Pods.References