A database is where WordPress stores nearly everything about your site — post content, comments, user accounts, and settings — organized into structured tables rather than individual files.
When you visit a WordPress page, the server pulls the relevant information from the database and combines it with your theme’s templates to build the page you actually see.
MySQL and MariaDB
WordPress traditionally uses MySQL, or its close relative MariaDB, to manage this data. Both are relational database systems, meaning data is organized into tables that can reference and relate to one another.
Why It Matters to You
You’ll rarely need to touch the database directly as a typical site owner — WordPress handles that through its dashboard. Still, it’s worth understanding it exists, especially when it comes to backups, since restoring a site properly means restoring both its files and its database together.
A corrupted or lost database, without a backup, generally means losing your posts, comments, and settings entirely — which is exactly why backups matter so much.