The Databases of WordPress – MariaDB

By Reuben Walker, 22 May, 2022
Graphic for MariaDB, a WordPress database

MariaDB

Illustration of man working at laptop on top of server with MariaDB database.

Contents

  • What is MariaDB?
  • How does MariaDB Work?
  • MariaDB vs. MySQL
  • MariaDB Resources

  • This article will take a quick look at the MariaDB, the only database alternative to MySQL for WordPress sites.


    In a previous article, we looked at the MySQL database. MariaDB is a fork of MySQL, which claims to have better performance.

    Here is mariadb.com, the enterprise version of MariaDB's value proposition: "Trusted by organizations like Deutsche Bank, DBS Bank, Nasdaq, Red Hat, ServiceNow, Verizon, and Walgreens – MariaDB meets the same core requirements as proprietary databases but at a fraction of the cost."

    What is MariaDB?

    According to the MariaDB Foundation, provider of the open-source version used by WordPress, "MariaDB Server is one of the most popular open-source relational databases. It’s made by the original developers of MySQL and guaranteed to stay open source. It is part of most cloud offerings and the default in most Linux distributions.

    It is built upon the values of performance, stability, and openness, and MariaDB Foundation ensures contributions will be accepted on technical merit."

    As mentioned at the beginning of the article, MariaDB is an open-source fork of MySQL. It was developed by the original MySQL developers, lead by "Monty" Widenius. Subsequently, it was accepted and maintained by the open-source community as an "improved" alternative to MySQL.

    Although MySQL is also an open-source project, since Oracle owns it, some open-source proponents distrust it. These worries have prompted some migration to MariaDB. They were also the impetus for Widenius to leave MySQL and create MariaDB in the first place.

    MariaDB was first released in October 2009, with version 5.1.38 Beta, based on MySQL 5.1.38.

    Since then, MariaDB continued to develop. In 2012 with a set of new features, MariaDB jumped from 5.* version number, comparable to MySQL, to 10.0. This updated numbering was to showcase the leap in features it had achieved. The latest release is version 10.9.1.

    How does MariaDB Work?

    An illustration of the data flow of WordPress using a MariaDB database.

    This diagram courtesy of WP Explorer illustrates the data flow of a WordPress site and how it interacts with a MariaDB database.

    When a visitor goes to your site, the WordPress core queries the database. The database then returns the requested data. WordPress core combines the retrieved data and executes its PHP code to dynamically generate an HTML page. That page is served to your visitor's browser.

    MariaDB vs. MySQL

    Differences

    Despite MariaDB being a fork of MySQL, these two database management systems have some differences:

    • MariaDB has a full GPL license while MySQL has a dual-license.
    • Each one handles thread pools differently.
    • MariaDB supports multiple storage engines.
    • In some situations, MariaDB provides better performance.

    A complete list of differences is available in the link for MariaDB vs. MySQL in the resources section at the end of this article.

    MariaDB was built as a “drop-in” replacement to allow all users of MySQL to exchange one for the other on their systems.

    Replacing MySQL with MariaDB is a natural process for most applications, including WordPress. Software, from popular CMS tools to apps like phpMyAdmin, works out of the box, and data exports and imports from one to the other without any changes.

    Similarities

    MariaDB’s vows to maintain compatibility with MySQL.

    • Filenames, binaries, and paths are the same on both.
    • Their data and table definition files are compatible.
    • Ports and sockets are the same.
    • All client APIs and protocols are compatible.
    • All MySQL connectors including PHP work with MariaDB.
    • MySQL client package works interchangeably with MariaDB.

    MariaDB conducts monthly merges to ensure compatibility and to get new features and bug fixes from Oracle.

    Wrapping Up

    In my opinion, most WordPress sites don't require the added complexity and potential cost of using MariaDB. However, if you are a large enterprise with demands for more extensive functionality in a database, it is a good solution. If that is the case, be sure to check out the links in this article.

    If you want the in-depth details of MariaDB vs. other enterprise-level databases, including MySQL, check out the link below in resources. Just remember that only MySQL and MariaDB databases work with WordPress.

    MariaDB Resources

    Authored by

     

    Reuben Walker toasting you


    Do you want more news on PHP and CMS development, cybersecurity, and more? Our sister site, Symfony Station has a weekly news roundup.

    📩

    Join our list  

    * indicates required
     
     
     
     
     
     
    Anything Else