Skip to content

Mautic 7.2.2 Install on Linux, with PHP 8.4, MariaDB 11.8

Mautic 7.2.2 installation guide for Debian 13 with PHP 8.4-FPM and MariaDB 11.8, using only the packages Debian ships. No third-party repositories needed.

A very promising, long-standing stack for Mautic 7!

This is, in my opinion, a software stack that is going to be widely used for several years. The planets (software versions) are now perfectly aligned for a great stack that will last a long time. Debian 13 is a great base for Mautic 7 instances, and the best part is that you no longer need to add a single third-party repository to get a modern stack: Debian 13 ships PHP 8.4 and MariaDB 11.8 all by itself.

4 Simple Steps to Install Mautic 7.2.2 on Linux

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

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

It is 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 a very reduced chance 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.

Pre-requisites for installing Mautic 7

  • A server or VPS connected to the internet.
  • A public IP and a domain or sub-domain.
  • SSH access to your server or VPS.

In this Mautic installation tutorial, we will be using:

  • Debian 13 (Trixie)
  • PHP 8.4 with PHP-FPM
  • MariaDB 11.8 LTS
  • Mautic 7.2.2

Debian 13

Debian 13 "Trixie" is the current stable release of Debian, and it is a perfect match for Mautic 7. It ships PHP 8.4 and MariaDB 11.8 in its own repositories, which means no PPA, no third-party keyring, no add-apt-repository lines to copy and paste. Everything you need is one apt install away.

PHP 8.4 with PHP-FPM

Mautic 7 supports PHP 8.2 through 8.5, and PHP 8.4 is the version Debian 13 provides by default. It brings strong performance improvements over previous releases and is the version the Mautic developers recommend as the sweet spot for Mautic 7.

We will run PHP through PHP-FPM rather than the older mod_php Apache module. It is the modern approach, it keeps PHP in its own service instead of loading it inside Apache, and it is the setup Mautic itself recommends for anything beyond a quick test. The price is a couple of extra configuration lines, which you will copy and paste below.

MariaDB 11.8 LTS

Oh yes! I am going to be using this version for a long time. This is the newest long-term support MariaDB release, and it is what Debian 13 ships by default.

MariaDB 11 introduced important changes to query execution self-optimization. 11.8 not only incorporates the latest fine-tuning to the Optimizer, it is also a long-term support release incorporating this new engine.

An interesting change was introduced in the way dates are optimized, with great impact in queries using dates, potentially a major improvement for Mautic performance.

Enough chit-chat, let's get 7.2.2 installed!

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

Let's get started installing Mautic 7 on our VPS. First, log in to your VPS and gain sudo privileges so you have the rights to issue all the commands:

sudo su

Now make sure your server is up-to-date. Debian 13 ships everything we need, so this is a plain update with no repositories to add:

apt update && apt upgrade -y

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

apt install apache2 mariadb-server unzip curl wget ca-certificates \
  php8.4 php8.4-fpm php8.4-{cli,xml,mysql,zip,intl,curl,gd,mbstring,bcmath} \
  libapache2-mod-fcgid -y

Activate the Apache modules needed to hand PHP requests to PHP-FPM, and enable the PHP-FPM configuration:

a2enmod proxy_fcgi setenvif rewrite expires headers http2 ssl actions alias
a2enconf php8.4-fpm

Configure Apache with a Mautic-ready virtual host:

wget https://raw.githubusercontent.com/Martech-WorkShop/toolBelt/refs/heads/Prod/Mautic/conf/apache/000-default.conf -O /etc/apache2/sites-available/000-default.conf

Configure PHP. These are the settings Mautic wants, applied to both the FPM and the CLI configuration:

sed -i 's/memory_limit = 128M/memory_limit = 512M/' /etc/php/8.4/fpm/php.ini
sed -i 's/post_max_size = 8M/post_max_size = 32M/' /etc/php/8.4/fpm/php.ini
sed -i 's/upload_max_filesize = 2M/upload_max_filesize = 32M/' /etc/php/8.4/fpm/php.ini
sed -i 's/max_execution_time = 30/max_execution_time = 60/' /etc/php/8.4/fpm/php.ini
sed -i 's/;date.timezone =/date.timezone = UTC/' /etc/php/8.4/fpm/php.ini
cp /etc/php/8.4/fpm/php.ini /etc/php/8.4/cli/php.ini

Restart PHP-FPM so the new settings take effect:

service php8.4-fpm restart

Create a database for Mautic.

/usr/bin/mariadb -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 utf8mb4 COLLATE utf8mb4_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 cli / bash mode…

> Note on the root password. The GRANT above gives root@localhost a password, which

> replaces MariaDB's default socket authentication for that account. From this point on,

> mariadb -u root on its own will return ERROR 1045 (28000): Access denied, because root now

> expects a password. Use mariadb -u root -p and type password. This is expected, not a

> broken install.

Step 2: Install Mautic 7.2.2

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

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

find /var/www/html -type d -exec chmod 755 -- {} +; find /var/www/html -type f -exec chmod 644 -- {} +; chown -R www-data:www-data /var/www/html

Almost done, let's reload Apache configuration to apply our changes, and clear the Mautic cache:

service apache2 restart
sudo -u www-data php /var/www/html/bin/console cache:clear

OK, so your new Mautic 7.2.2 installation is now completed. Now you just need to run the Installation Wizard:

Step 3: Run the Mautic 7 Configuration Wizard.

Mautic 7 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 7 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://raw.githubusercontent.com/Martech-WorkShop/toolBelt/refs/heads/Prod/Mautic/conf/cron/cronjobs -O /root/cronjobs
crontab /root/cronjobs

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

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

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

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! [email protected]

Comments

Subscribe to mauteam.org

Join the newsletter and get the latest posts delivered straight to your inbox.

[email protected] Subscribe