Installing MariaDB
In this lesson you will install MariaDB from Ubuntu's official packages, make sure the service is running correctly, and learn how to access it securely with the root account. You'll also review how MariaDB handles logging with journald and how to read or follow logs for troubleshooting.
WordPress was originally built for MySQL and currently supports version 8.0 or greater. It also mentions support for MariaDB version 10.6 or greater, and support for SQLite is in the works as well. Percona Server, Aurora MySQL and other drop-in replacements for MySQL are also mostly compatible.
Unless you have a need or strong preference, I recommend always going for MariaDB.
MariaDB
MariaDB is a community-developed fork of MySQL, led by some of the original developers of MySQL. It's fully stable, commercially supported, and guaranteed to stay open source.
It's a drop-in replacement for MySQL, which means our existing mysqlnd and
mysqli PHP modules will continue to work. Ubuntu and other Debian-based
systems also ship the legacy MySQL-prefixed binaries (as symlinks), such as
mysqldump for convenience and portability.
Installing
Ubuntu 24.04 currently comes with MariaDB 10.11 in its official packages. This is an LTS release which will be supported until early 2028. If you're looking for newer packages, MariaDB has their own repositories for Ubuntu and other Linux distributions.
I always recommend going for the OS-provided packages, unless there is a strong need for newer (or older) versions. You might be tempted to try a newer release for better performance, but in my experience the gain is barely noticeable in a WordPress context.
This article is for premium members only. One-time payment of $96 unlocks lifetime access to all existing and future content on wpshell.com, and many other perks.