Mautic is a Marketing Automation Software, It lets you automate all marketing through campaigns in a centralized location to track everything at one place.
Before we continue installing mautic I suggest you to read my post on how to setup LEMP stack on ubuntu 16.0, so I am assuming that you have already installed PHP7.0-FPM, NGINX, MariaDB/MySQL.
I will download all files of mautic to my /var/www/html directory, by running the following command
sudo apt-get install unzip
unzip 2.1.1.zip -d html
chown -R www-data:www-data html/
Setting up Database
First, we will log into MySQL/MariaDB and create the database that will be used by Mautic. Additionally, we will create a dedicated user for Mautic and grant it privileges on the new database.
mysql -u root -p
create database mautic;
grant all on mautic.* to 'muser' identified by 'password';
Setting up PHP
We are assuming that you have installed PHP7.0-fpm, you just need to make sure you have all the PHP extensions needed by Mautic.
sudo apt-get -y install php7.0-fpm php7.0-cli php7.0-json php7.0-curl php7.0-gd php7.0-mysqlnd php7.0-imap php7.0-mcrypt php7.0-mbstring php7.0-xml php7.0-zip php7.0-intl
sudo nano /etc/php/7.0/fpm/php.ini
date.timezone = "Asia/Kolkata"
memory_limit = 256M
upload_max_filesize = 32M
post_max_size = 32M
max_execution_time = 300
sudo service php7.0-fpm restart
Now edit your Nginx config for your Mautic site. Make sure it matches the below configuration file.
Now we will install a mautic step
- Enter Database Details
- Set Admin panel password
- Leave everything default
Setting Up CRON Job
There are four CRON jobs to automate mail scheduling, segments, campaigns etc. The time for each is set to be executed at every 15 minutes depending on server speed.
*/5 * * * * php /var/www/html/app/console mautic:segments:update
*/5 * * * * php /var/www/html/app/console mautic:campaigns:rebuild
*/5 * * * * php /var/www/html/app/console mautic:campaigns:trigger
*/5 * * * * php /var/www/html/app/console mautic:emails:send
*/5 * * * * php /var/www/html/app/console mautic:email:fetch