keepcalculator

06 Numbers and Powers

WordPress MySQL and MariaDB Version Requirements

Card No. 06·69523 · Updated · Standard formula, shown below

WordPress requires MySQL version 5.7 or greater, or MariaDB version 10.3 or greater, to run properly. These are the minimum official requirements; for best performance and security, you should use a more recent version, such as MySQL 8.0 or MariaDB 10.11 or newer.

Why WordPress Has Database Version Requirements

WordPress stores every post, page, comment, user, setting, and plugin option in a MySQL or MariaDB database. The database is the core of your site; without it, WordPress cannot function. The WordPress core code uses SQL queries that rely on features and syntax introduced in specific database versions. If your database is too old, those queries may fail, causing errors, data corruption, or a completely broken site.

The official requirement is not arbitrary. WordPress developers test against certain minimum versions to ensure that all core features work correctly. For example, older MySQL versions lack support for certain indexing methods and character set collations that WordPress uses. As the software evolves, the minimum required version is raised to match the features the current codebase depends on.

Official Minimum Versions and What They Mean

According to the WordPress.org “Requirements” page, the database requirement is:

  • MySQL: 5.7 or greater
  • MariaDB: 10.3 or greater

These are the minimums. In practice, you should aim for much newer versions. MySQL 5.7 reached end of life in October 2023 and no longer receives security updates. MariaDB 10.3 also reached end of life in May 2023. Using an unsupported database version exposes your site to known vulnerabilities that will never be patched.

For a new installation, the recommended choice is MySQL 8.0 or MariaDB 10.11 (the current long-term support release of MariaDB). These versions are actively maintained, fast, and fully compatible with WordPress.

How to Check Your Current Database Version

You can find your database version in several ways, depending on your hosting setup:

  • phpMyAdmin: Log in to your hosting control panel, open phpMyAdmin, and look for the “Database server” line on the home page. It shows the version number (e.g., “Server: MySQL 8.0.36”).
  • WordPress Admin: Go to Tools → Site Health. The “Info” tab has a “Database” section that lists the server version.
  • WP-CLI: Run wp db query "SELECT VERSION();" from the command line.
  • Hosting Support: If you cannot find it, your host’s support team can tell you.

If your version is below the minimum, you will likely see a warning in the Site Health screen, and some plugins may refuse to activate.

MySQL vs. MariaDB: What’s the Difference for WordPress?

MariaDB is a fork of MySQL created in 2009 by the original MySQL developers after Oracle acquired MySQL. It is designed as a drop-in replacement, meaning it uses the same SQL syntax, the same commands, and the same connection protocols. For WordPress, the two are functionally identical in most cases.

However, there are subtle differences:

  • Version numbers: MariaDB uses a different versioning scheme. MariaDB 10.3 is roughly equivalent to MySQL 5.7 in terms of feature parity, but the numbers do not align exactly.
  • Storage engines: MariaDB includes additional storage engines like Aria and MyRocks, but WordPress uses InnoDB by default, which both support.
  • Performance: In some benchmarks, MariaDB performs slightly better in certain read/write workloads, but the difference is rarely noticeable for a typical WordPress site.

If your host offers both, you can choose either. The key is to use a version that meets or exceeds the minimum and is still supported.

Common Problems Caused by Outdated Database Versions

Running WordPress on a database version below the minimum can cause a variety of issues:

  • Site Health warnings: WordPress will show a critical issue if your database is too old.
  • Plugin incompatibility: Many modern plugins, especially those that handle e-commerce or membership, require MySQL 8.0 or MariaDB 10.4+.
  • SQL errors: You may see errors like “Unknown column” or “Syntax error” when WordPress runs queries that use newer SQL features.
  • Security vulnerabilities: Old database versions have known exploits that are publicly documented. Hackers actively scan for sites running outdated software.
  • Slow performance: Older database versions lack optimizations for query caching and index usage, making your site slower.

One common misconception is that a database version upgrade is risky and should be avoided. In reality, upgrading from MySQL 5.7 to 8.0 is a standard procedure that hosting providers often handle automatically. If you are on shared hosting, your host usually manages the upgrade for you.

How to Upgrade Your Database to a Supported Version

Upgrading your database is not something you do through the WordPress admin. It is a server-level change. Here is the typical process:

  1. Back up your database: Export a full SQL dump of your WordPress database. You can do this with phpMyAdmin or a plugin like UpdraftPlus.
  2. Check compatibility: Ensure your WordPress core, all themes, and all plugins are compatible with the new database version. Most are, but it is worth checking with any plugin that does heavy database work, such as caching or custom tables.
  3. Upgrade the database software: If you use managed WordPress hosting, contact support and ask them to upgrade. If you have a VPS or dedicated server, use your package manager (e.g., apt upgrade mysql-server on Ubuntu) or follow your control panel’s upgrade wizard.
  4. Verify the upgrade: After the upgrade, check your database version again and run the WordPress Site Health tool to confirm there are no warnings.

If you are moving from MySQL to MariaDB (or vice versa), the process is similar. You would export the database, install the new server, and import the dump. Most hosts offer a one-click switch if they support both engines.

Frequently Asked Questions

Can WordPress run on MySQL 5.6?

Technically, WordPress may still run on MySQL 5.6, but it is not supported. The WordPress core code may work, but you will get warnings, and many plugins will refuse to install. More importantly, MySQL 5.6 reached end of life in February 2021, meaning it has unpatched security vulnerabilities. You should upgrade immediately.

Does WordPress work with MariaDB 10.2?

No. MariaDB 10.2 is below the minimum requirement of 10.3. It also reached end of life in May 2022. You should upgrade to at least 10.3, but ideally to 10.11 or newer.

Is MariaDB better than MySQL for WordPress?

Neither is objectively better. Both are excellent, open-source relational databases that work seamlessly with WordPress. Choose whichever your host provides and supports. The most important factor is that you are running a current, supported version.

How do I know if my database is too old?

WordPress will show a warning in the Site Health screen (Tools → Site Health) if your database version is below the minimum. You can also check the database version manually as described above. If it is below MySQL 5.7 or MariaDB 10.3, it is too old.

What happens if I ignore the database version warning?

You risk security vulnerabilities, plugin incompatibility, and potential data corruption. Over time, as WordPress and plugins update, they may stop working entirely. It is strongly recommended to upgrade as soon as possible.

Can I upgrade my database without losing data?

Yes. A database upgrade preserves your data as long as you follow the correct procedure. Always back up before upgrading, and test the upgraded site in a staging environment if possible. Most hosting providers offer automated upgrades that are safe.

Related

Method: the standard formula for this calculation, rounded as each result states. See how the calculators work or report an error.

More cards in this drawer

The whole Numbers and Powers drawer →