UPDATED on January, 28 – 2020 for Mautic 2.15.3
This is by far the simplest way to install Mautic on a VPS, with this Mautic Installation tutorial, you will learn how to complete the Mautic 2.15.3 installation on a Virtual Private Server (VPS) with PHP 7.2 on top of Ubuntu 18.04 LTS in just about 7 minutes.
3 simple steps to install Mautic:
- Install the required packages like Apache and MySQL.
- Install Mautic and run the configuration wizard.
- Install Mautic Cron Jobs.
If you are new to Mautic or to the Linux command line, this 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 Installation.
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: https://m.do.co/c/7a85b33e64cf
Step 1: Install the required packages.
Let’s get started, log in to your VPS… first you want to gain sudo privileges so you have the rights to issue all the commands:
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.
apt install apache2 libapache2-mod-php php unzip mariadb-server php-xml php-mysql php-imap php-zip php-intl php-curl ntp -y
Activate any Apache modules that are not active by default after installation.
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)]>”
CREATE DATABASE mautic DEFAULT CHARACTER SET utf8 COLLATE utf8_unicode_ci;
GRANT ALL ON mautic.* TO 'root'@'localhost' IDENTIFIED BY 'password';
After the “EXIT;” command you will return to the normal mode…
Step 2: Install Mautic and Run the Mautic Configuration Wizard.
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 Installation is now completed, now you just need to run the Installation Wizard:
Run the Mautic Configuration Wizard.
Mautic 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 3: Install the Mautic 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.
Done! The simplest way to install cron jobs ever…
If you want to know more about Mautic cron jobs you can check these other posts:
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 in 2020
Hi, thank you for reading this article, hope you found it useful.
My name is Yosu Cadilla, I’ve been both a Marketer since 1996 and a Systems Administrator since 2000, switching back and forth and mixing both trades. Since discovering Mautic, I’ve been specializing in large Mautic deployments as well as Mautic for agencies. Nowadays all my clients are Mautic related.
If you are planning on deploying Mautic on a large scale, or if you are undecided about Mautic being a good fit for your organization… let’s have a chat! email@example.com