Skip to content

Mautic 3.3.5 Installation on Ubuntu 20.04 with PHP 7.3 and MySQL 5.7

Install Mautic 3

UPDATED on August, 6 2022 for Mautic 3.3.5. This is by far the simplest way to install Mautic 3 on a VPS.
With this Mautic 3 Installation tutorial, you will learn how to complete the Mautic 3.3.5 installation with PHP 7.3 on top of Ubuntu 20.04 LTS and MySQL 5.7 (MariaDB 10.2).

3 Simple Steps to Install Mautic 3:

  1. Install the packages required to run Mautic 3.
  2. Install Mautic 3 and run the configuration wizard.
  3. Install Mautic 3 Cron Jobs.

Those are the best possible specs for your new Mautic 3 installation! Start your M3 venture with the right foot!

If you are new to Mautic 3 or to the Linux command line, this installation tutorial was made specifically for you, it’s the simplest way to get started as I carefully designed it to have the fewer amount of commands possible so it’s easier to understand and the probability of anything going sideways is minimal.

It’s designed to give you a quick success using the command line so you can have an easy victory and gain the confidence to later advance towards more complex, more secure, and better-optimized setups.

On the other hand, if you are more experienced with Linux, and don’t mind some extra complexity, this might be a better tutorial for you: Securing your Mautic 3 Installation.

Why install Mautic 3 when Mautic 4 is already available?

  • Well tested, very stable, less bugs.
  • Existing bugs are known and already fixed.
  • Uses older, stabler versions of the entire stack (Ubuntu, MariaDB, PHP, etc…)
  • Stack will not vary over time as it is very mature.

What all this means is very reduced chanced of hitting a bug or compatibility issue with this setup.
If you do hit a bug, it will most probably be already well known and resolved and the solution is out there.

Step 1: Install the packages required to run Mautic 3.

Let’s get started installing Mautic 3 on our VPS, first log in to your VPS… first you want to gain sudo privileges so you have the rights to issue all the commands:

sudo su

Now make sure your server is up to date by updating Ubuntu.

apt update && apt upgrade -y

Install all the required packages (applications) that are needed to run Mautic.

First, we need to add the ondrej/php repository, because Ubuntu 20.04 comes with PHP 7.4 by default, but we want to use the more widely supported PHP versio for Mautic 3, which is PHP 7.3

apt install software-properties-common

add-apt-repository ppa:ondrej/php

apt update && apt upgrade -y

Now we are ready to install all the required packages:

apt install mariadb-server apache2 libapache2-mod-php7.3 php7.3 unzip php7.3-xml php7.3-mysql php7.3-imap php7.3-zip php7.3-intl php7.3-curl ntp -y

Activate any Apache modules that are not active by default after installation.

a2enmod rewrite

Configure Apache:


mv 000-default.txt /etc/apache2/sites-available/000-default.conf

Create a database for Mautic.
mysql -u root 

This command will connect you to your database, the only difference you will notice is that the text before your command prompt will change to “MariaDB [(none)]>”

MariaDB [(none)]> CREATE DATABASE mautic DEFAULT CHARACTER SET utf8 COLLATE utf8_unicode_ci;
MariaDB [(none)]> GRANT ALL ON mautic.* TO 'root'@'localhost' IDENTIFIED BY 'password';
MariaDB [(none)]> EXIT;

After the “EXIT;” command you will return to the normal mode…

Step 2: Install Mautic 3 and Run the Mautic Configuration Wizard.

cd /var/www/html

Make sure Apache and Mautic, have ownership and write access to the files.

chown -R www-data:www-data /var/www/html
chmod -R 775 /var/www/html

Almost done, let’s reload Apache configuration to apply our changes.

service apache2 reload

OK, so your new Mautic 3 Installation is now completed, now you just need to run the Installation Wizard:

Run the Mautic 3 Configuration Wizard.

Mautic 3 is now ready to be configured, you just need to use a browser, like Chrome or Firefox, and navigate to the IP of your server, preceded with http://

 Here’s an excerpt of your configuration for the Mautic Installation Wizard

  • Database driver: MySQL PDO
  • Database Host: localhost
  • Database port: 3306
  • DB name: Mautic
  • Database Table Prefix: Leave empty
  • DB User: root
  • DB Password: password
  • Backup existing tables: No

If you need help with the wizard steps, check this other post with very detailed step by step instructions for each of the screens: Mautic 3 Installation: The Configuration Wizard

Step 3: Install the Mautic 3 Cron Jobs.

Mautic is now already installed and you can navigate to all the sections and explore, but if you want working segments and campaigns you will also need to install the Mautic cron jobs.


crontab cron-jobs.txt

If you want to know more about Mautic 3 cron jobs you can check these other posts:

Mautic cron jobs for dummies & marketers.
Mautic Cron Jobs: Which Ones to Use.

If you were successful installing Mautic please write Yes! or Succesful! in the comments below.

Got any questions? got stuck on one of the steps? anything not working as described in the tutorial? Go ahead and ask in the comments here below!!

And if you want to further advance and improve your Mautic Installation, check this other, more advanced, Mautic Installation guide:
Secure Mautic Installation on a VPS.

If you don’t yet have a VPS, this tutorial was made and tested using a Digital Ocean Droplet (VPS), I recommend you to use the same.
You can use this link to get $100 FREE credit to spend on DO servers:

Yosu Cadilla

My name is Yosu Cadilla, a Systems Administrator since year 2000. I discovered Mautic on 2017 and since,
I’ve specialized in running Mautic for Marketing agencies and other large Mautic deployments.
Currently, I run a very specialized and fine-tuned cluster of Mautic-optimized servers.
If you are planning on deploying Mautic on a large scale, let’s have a chat!

Thank you for reading this article, I hope you found it useful. If you have questions or comments, share them on the comments section below. I do my best to reply to every single comment.