Flash Sale:75% Off Hosting + Free DomainEnds in13h47m14sView Plans
Hostvento logoHostvento

What is the WordPress database?

Your posts, users and settings are not stored in files. They live in a database. This guide explains what that means.

WordPress2 min read4 steps5 screenshots

What is a database?

A database is an organized store of information. Think of a filing cabinet with many drawers. Each drawer holds one kind of thing. Computers can search it very fast.

WordPress uses a database system called MySQL, or a close cousin named MariaDB. Both store data in tables. A table is like a spreadsheet with rows and columns.

What is stored in it?

  • Your posts and pages
  • Comments
  • User names and passwords (stored in scrambled form)
  • Site settings
  • Menus and widget settings
  • Plugin and theme settings

Images and theme files are not inside the database. They sit in your wp-content folder. The database only keeps a note of where each image is.

Main tables

Table names start with a prefix. The default prefix is wp_, but yours may differ. Here are some key tables:

TableWhat it holds
wp_postsPosts, pages and media entries
wp_postmetaExtra details about posts
wp_usersYour user accounts
wp_usermetaExtra details about users
wp_commentsVisitor comments
wp_optionsSite settings
wp_termsCategories and tags

How does WordPress find its database?

The wp-config.php file holds the database name, user name, password and host. WordPress reads this file each time a page loads. Then it asks the database for the content it needs.

How to look at it

  1. Log in to your hosting control panel.
  2. Open phpMyAdmin. This is a web tool for viewing databases.
  3. Click your WordPress database on the left.
  4. Click a table name to see its rows.
Warning: Do not edit or delete rows unless you know what you are doing. Take a backup first. A small mistake can break your site.

Keep it healthy

  • Back up the database often. Use your control panel or a backup plugin.
  • Remove spam comments and old revisions.
  • Delete plugins you no longer use.
  • Use a strong database password.
    MYSQL Database Section
Tip: Not sure about your database? Open a support ticket.

Quick recap

  • The database stores your content and settings in tables.
    MYSQL New Users
  • Files and images stay in folders, not in the database.
    Current DataBase
  • wp-config.php tells WordPress how to connect.
  • Use phpMyAdmin carefully, and back up first.
    phpmyadmin interface
    basic management task