MariaDB vs MySQL-differences and compatibility
Compare MariaDB and MySQL: performance differences, storage engines, JSON support, and compatibility for WordPress.
On this page
MariaDB and MySQL are two separate but compatible database systems. MariaDB was created by the original MySQL developers after Oracle Corporation acquired MySQL in 2010. Today, many hosting providers (including UnderHost) offer MariaDB as the default, though MySQL is still widely available. For most users and applications, they're functionally interchangeable.
What is MariaDB?
MariaDB is an open-source relational database system developed as a community-driven fork of MySQL. It maintains MySQL compatibility while adding new features, performance improvements, and additional storage engines.
Key facts about MariaDB:
- Created by Monty Widenius, the original MySQL developer
- Fully open-source under GPL license (no commercial license required)
- Actively maintained with regular security updates
- Versions numbered 10.x, 11.x (after version 10, numbering diverged from MySQL)
- Used by Wikipedia, WordPress.com, and major companies worldwide
Drop-in replacement concept
"Drop-in replacement" means MariaDB can replace MySQL in most scenarios without any code changes. The connection protocols, SQL syntax, and PHP extensions are identical or nearly identical.
Why this matters:
- WordPress, Drupal, Magento, and other CMS systems work on either without modification
- PHP's
mysqliextension works with both - Database dumps (exports) from MySQL can be imported into MariaDB and vice versa
- Most SQL queries work identically on both
Limitations to the "drop-in" claim:
- Some advanced features (JSON, window functions, etc.) are newer in MariaDB and may not exist in older MySQL versions
- Very old MySQL versions (5.1) don't have full compatibility with current MariaDB
- Custom stored procedures using MySQL-specific syntax may need tweaks
Key differences between MariaDB and MySQL
| Feature | MariaDB (10.x+) | MySQL (8.0+) |
|---|---|---|
| License | 100% open source (GPL) | Open source + commercial versions |
| Organization | MariaDB Foundation, community-driven | Oracle Corporation |
| Default storage engine | InnoDB (with Aria option) | InnoDB |
| JSON support | Native JSON type (10.2+) | Native JSON type (5.7+) |
| Performance | Often faster for read-heavy workloads | Strong overall, especially writes |
| Version numbering | 10.x, 11.x | 5.7, 8.0 |
| Update frequency | Regular community updates | Quarterly Oracle releases |
| Common uses | Hosting, WordPress, open-source projects | Enterprise, high-transaction systems |
WordPress and other applications
WordPress, Drupal, Magento, and Joomla all work identically on MariaDB and MySQL. WordPress has been tested on MariaDB since version 5.5 and officially supports it.
WordPress uses the PHP mysqli extension (modern) or legacy mysql extension (deprecated) to connect. Both extensions work with either database.
To verify WordPress database type:
- Log in to WordPress admin panel
- Go to Tools → Site Health
- Check the database server version listed
No matter what it says, WordPress will run identically. The database system is invisible to WordPress users.
How to check which you're running
Method 1: SSH command line
mysql --version
# Output example:
# mysql Ver 15.1 Distrib 10.6.14-MariaDB (MariaDB)
# OR
# mysql Ver 8.0.35-0ubuntu0.22.04.1 for Linux on x86_64
Method 2: phpMyAdmin
- Log into phpMyAdmin (via cPanel)
- Check the top-left corner—it displays "MariaDB X.X.X" or "MySQL X.X.X"
Method 3: PHP script
<?php
echo phpversion(); // Shows PHP version
$conn = new mysqli(...);
echo $conn->server_info; // Shows MariaDB or MySQL version
?>
Method 4: cPanel
- Log into cPanel
- Go to Home → Server Information
- Look for "MySQL/MariaDB Version"
Migrating between MariaDB and MySQL
Can you switch from one to the other? Yes, is generally straightforward:
Steps to migrate:
- Export your database: Use
mysqldumpor phpMyAdmin to export your database as SQL - Stop your application: Take your website offline temporarily
- Create new database: In the target database system, create a fresh database
- Import the dump: Import the SQL file into the new database
- Update connection details: Update your
wp-config.phpor application config if the host/port changed - Test thoroughly: Verify all functions work before going live
For most applications, this process works seamlessly. Your data structure remains identical.
Which one should you use?
For most users and projects, the choice doesn't matter.
Use MariaDB if:
- Your hosting provider defaults to it (like UnderHost)
- You prefer 100% open-source stack
- You want frequent community-driven updates
- You're running WordPress or other open-source CMS
Use MySQL if:
- You have existing MySQL expertise
- You require Oracle's commercial support
- You're in an enterprise environment with Oracle contracts
- You need guaranteed compatibility with Oracle technologies
The reality: Most developers and site owners never notice which one they're using. Both are stable, secure, and performant for web applications.
UnderHost hosting accounts include MariaDB as the default database system. All shared hosting, Cloud VPS, and most dedicated servers use MariaDB, which is fully compatible with all popular applications.
Related: Database administration | InnoDB storage engine | SQL basics | Updating MySQL/MariaDB
Need hosting for database-backed apps?
Run WordPress, CMS, PHP apps, and MySQL/MariaDB workloads on UnderHost hosting, VPS, or managed servers.





















