Skip to content

Mautic 4.4.13 Installation Tutorial: Ubuntu 22.04, PHP 8.0, MariaDB 10.6

Why install Mautic 4 when Mautic 5 is already available?
Don’t get fooled by the new and sparkly Mautic 5, it is too soon to use it, go for the stable and reliable Mautic 4 instead.

  • Well tested, very stable, no known major bugs.
  • Existing bugs in M4 are already fixed, and security patches were added in Mautic 4.4.13.
  • Uses older, stabler versions of the entire stack (Ubuntu, MariaDB, PHP, etc…)
  • Stack will not vary over time as it is very mature.

4 Simple Steps to Install Mautic 4

  1. Install the packages required to run Mautic 4.
  2. Install Mautic 4.4.13
  3. Run the Mautic 4 configuration wizard.
  4. Install the Mautic 4 Cron Jobs.

Updated on September, 20 2024 for Mautic 4.4.13

Pre-requisites:

A server or VPS connected to the internet.
A public IP and a domain or subdomain for Mautic.
SSH access to your server or VPS.

If you are new to Mautic 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.

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 4.

Let’s get started installing Mautic 4 on our VPS, first log in to the VPS… 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 your Ubuntu server.

apt update && apt upgrade -y

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

First, we will add the ondrej/php repository, because we want to use updated versions of the packages.
apt install software-properties-common

add-apt-repository ppa:ondrej/php

add-apt-repository ppa:ondrej/apache2

apt update && apt upgrade -y

Now we are ready to install all the required packages:

apt install unzip mariadb-server apache2 libapache2-mod-php8.0 php8.0 php8.0-{xml,mysql,imap,zip,intl,curl,gd,mbstring,bcmath}

Activate any Apache modules that are not active by default after installation, and we also enable the newly installed PHP 8.0
a2enmod php8.0

a2enmod rewrite

Configure Apache:

wget https://mauteam.org/wp-content/uploads/2019/10/000-default.txt

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

Configure PHP:

wget https://mauteam.org/wp-content/uploads/2019/10/php.ini.txt

mv php.ini.txt /etc/apache2/sites-available/php.ini

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)]> FLUSH PRIVILEGES;
MariaDB [(none)]> EXIT;

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

Step 2: Install Mautic 4.4.13

cd /var/www/html
wget https://github.com/mautic/mautic/releases/download/4.4.13/4.4.13.zip
unzip 4.4.13.zip
rm 4.4.13.zip

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 4.4.13 Installation is now completed, now you just need to run the Installation Wizard:

Step 3: Run the Mautic 4 Configuration Wizard.

Mautic 4 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 Installation: The Configuration Wizard

Step 4: Install the Mautic 4 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.

wget https://mauteam.org/wp-content/uploads/2019/10/cron-jobs.txt

crontab cron-jobs.txt

rm cron-jobs.txt

If you want to know more about Mautic 4 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 “Successful!” 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.

Yosu Cadilla

My name is Yosu Cadilla, a Systems Analyst and Platform Engineer for mktg.dev
I discovered Mautic in 2017 and since have specialized in:
– Running Mautic for Marketing Agencies.
– Running large Mautic instances, sometimes
with millions of contacts.
– Helping companies build and optimize their (usually Mautic) runtime infrastructure.

If you are planning on deploying Mautic for your Marketing Agency, or you have a large Mautic Instance…
Let’s have a chat! yosu.cadilla@gmail.com