Saturday, October 24, 2026The WordPress PlaygroundFacebookXPinterest
Glossary

WordPress Database

Every post you write, every comment you approve and every setting you save has to be stored somewhere. In WordPress, that place is the WordPress database, an organized store of all your site's content and settings.

Your theme, plugin and image files sit in folders on the server, but your words and settings live here. If WordPress cannot reach the database, visitors see an error instead of your site.

What is stored in the WordPress database?

Think of the database as a big filing cabinet with labeled drawers. Each drawer is a table, and each table holds one type of information. A standard single site has 12 tables. Here are the most important ones:

  • wp_posts: posts, pages, revisions, menu items and media details.
  • wp_postmeta: extra details about posts, like custom fields.
  • wp_users and wp_usermeta: user accounts and profile data.
  • wp_comments: every comment on your site.
  • wp_options: site settings, plus options saved by themes and plugins.

By default, every table name starts with wp_. You can pick a different prefix during installation, and WordPress saves it in wp-config.php.

How WordPress talks to its database

WordPress usually runs on MySQL or MariaDB. When someone opens a page, PHP asks the database for the right content, builds the HTML and sends it to the browser. This happens on every visit unless a cache serves a saved copy.

You can look inside the database with a tool like phpMyAdmin. Our guide on how to access the database in WordPress explains the steps.

Keeping the database healthy

Over time, the database collects clutter such as old revisions, spam comments and expired temporary data. A cleanup now and then keeps it lean. A few simple habits help:

  • Empty the comment spam and trash folders regularly.
  • Delete plugins you no longer use, and clear any settings they leave behind.
  • Keep the number of saved revisions under control.

For example, you can limit post revisions to reduce database size.

Warning

There is no undo button in the database. Take a full backup before you delete or edit anything directly.

That's the WordPress database in a nutshell: the place where your content really lives. If something is not clear, tell us in the comment section below.