10

I know WordPress expects to use MySQL as it's database backend, but can I switch to using MariaDB instead?

MariaDB is a fork of MySQL that includes a bunch of really nice improvements for management and has some great SQL language improvements.

0
11

Yes, you can use MariaDB. MariaDB is a drop-in replacement for MYSQL so compatibility is not an issue. WordPress even lists MariaDB as an option within the requirements on their website:

We recommend servers running version 7.2 or greater of PHP and MySQL version 5.6 OR MariaDB version 10.0 or greater.

Here is a resource from MariaDB on this topic https://mariadb.com/resources/blog/how-install-and-run-wordpress-mariadb.

1
4

There is no problem. It's compatible. remember you need to install php-mysql library.

4

Right now the answer is "yes". The problem may begin when the difference between maria and mysql will be in sql syntax level in a way which prevents having compatibility between them.

As both products do not live alone in the world and have to rely on 3rd party developer (like the developers of the php mysql module), I think that there is no chance that a major difference between the two on the "API" level will happen in the short to medium time frame. Most likely the differences between the two will continue to be in performance and admin side.

3
  • MariaDB 10.3 already has syntax divergences from MySQL Aug 22 '18 at 16:46
  • 2
    @MaxVernon, sure, but as long as you do not need them to access data in the db, create tables etc, you can have a common ground. Those divergences are right now just extensions. At some point the amount or type of them will cause a problem, but I think that looking from the WP POV, which by itself partially relies on PHP integration with both, it will take time until thise changes will reach a state in which you just can not write compatible SQL between the both of them Aug 22 '18 at 16:51
  • 1
    @MaxVernon it's not a divergence if a (standard SQL) feature is implemented in one and not in the other. Divergence would be if a feature is implemented with different syntax or if the same syntax does different things in each product. Sep 14 '18 at 18:48

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.