MySQL
Quick Definition
MySQL is the open-source database system that WordPress uses to store all your content — posts, pages, comments, settings, and user data. It works behind the scenes, managed by your hosting provider.
What Is MySQL?
MySQL is an open-source relational database management system (RDBMS) that stores and organizes data in tables. The name combines "My" (the name of co-founder Michael Widenius' daughter) with "SQL" (Structured Query Language — the language used to interact with databases).
MySQL is developed and maintained by Oracle Corporation. It's one of the most widely used databases in the world, powering everything from small blogs to Facebook and YouTube.
WordPress uses MySQL (or its fork MariaDB) to store everything:
- wp_posts — all your posts, pages, and revisions
- wp_options — site settings (site title, permalink structure, active theme)
- wp_users — user accounts and roles
- wp_comments — all comments
- wp_terms — categories and tags
- wp_postmeta — custom fields and metadata
According to the WordPress requirements page, the recommended version is MySQL 8.0 or greater (or MariaDB 10.6+). Older versions (MySQL 5.5.5+) still work but have reached End of Life and may expose your site to security vulnerabilities.
MySQL in Practice
As a WordPress site owner, you rarely interact with MySQL directly. Your hosting provider manages the database server. WordPress's PHP code handles all database operations automatically — creating tables during installation, storing content when you publish, and retrieving data when visitors load a page.
You might encounter MySQL in these situations:
- phpMyAdmin — a web tool (included with most hosts) for browsing and editing your database directly. Useful for emergencies like resetting a forgotten admin password.
- Database backups — your backup plugin exports your MySQL database as an
.sqlfile - Migrations — when moving hosts, you export and import your database
- "Error establishing a database connection" — this common error means WordPress can't connect to MySQL (usually wrong credentials in
wp-config.php)
Why It Matters
Your database is your site's brain — lose it and you lose everything. That's why regular backups are non-negotiable. A healthy, optimized database also means a faster site. See our backup guide and database optimization guide for more.