MariaDB 10.1 Setup for Ubuntu 14.04 – Make WordPress Fly

In Development

MariaDB 10.1 Setup

In this tutorial we will cover optimal MariaDB 10.1 setup for Ubuntu 14.04 on a VM with 2-4GB of RAM. This is part 2 of the “Make WordPress Fly” tutorial. You can find part 1 here. Part 1 covered the benefits of using HHVM, MariaDB, Nginx and Ubuntu 14.04 to run a WordPress website. In this section we’ll be digging in to MariaDB and the optimal configurations for it. This tutorial assumes you have a VM with at least 512MB of RAM, 1 Xeon Core, 10 GB HDD and Vanilla Ubuntu 14.04 installed and ideally secured. If you need a VM check out the Ubuntu VPS from Bitronic Technologies which meet the requirements for this tutorial (only $5).

So, assuming you have your Ubuntu VPS all setup, we will proceed with the fairly straightforward process of installing MariaDB on Ubuntu 14.04. We are specifically going to be deploying MariaDB 10.1 which as discussed in part 1 has significant performance benefits over even the newest versions on MySQL. First, connect to your VM via SSH.

Then we’ll add the MariaDB 10.1 repository and install the prerequisites.

Once the key is imported and the repository added we will install MariaDB.

During that process you will be prompted to create a root password for MariaDB. Make sure that you store it in a safe place. Consider using KeePass (or a similar utility) for test passwords, it creates strong passwords you can review later and encrypts them with a master key.

Now that MariaDB is installed we need to make sure it runs on startup.

Then, run the  “mysql_secure_installation”. This will guide you through some procedures that will remove some defaults which are dangerous to use in a production environment.

Next we will want to check that everything looks good in the my.cnf file.

It looks like this, yours should be similar, it may be a bit different as MariaDB does some system based configuration on installation.

Performance can be tweaked a bit once we’ve had the WordPress site up and running for 24-48 hours by using For good measure restart the service.

This concludes part 2 of the guide “MariaDB Setup for Ubuntu 14.04 – Make WordPress Fly”. As the rest of the guide is released links will be posted here and on all of the articles in the tutorial.



Preliminary – Getting Started with an Ubuntu VPS Running 14.04

Part 1 – HHVM, MariaDB and Nginx Make WordPress Fly – Intro

Part 2 – MariaDB Setup for Ubuntu 14.04 – Make WordPress Fly

Part 3 – Install HHVM, Nginx on Ubuntu 14.04 – Make WordPress Fly

Leave your thoughts and comments below and thanks for reading!


  1. Hi, I’m just reading over your article and it looks very interesting. I’m wondering if this setup would work with a 1GB VM, do I need to make any changes to the configuration?

    Thanks again for this tutorial, very helpful!

  2. Hello,

    Thanks for this tutorial, am thinking of using a different server for my databases i was thinking if Mariadb 10.1 is compatible with WordPress?

Submit a comment