Atlantic.Net Blog

How to Install Mautic Marketing Automation Tool on Ubuntu 20.04

Hitesh Jethva
by Atlantic.Net (299 posts) under VPS Hosting
0 Comments

Mautic is a very popular open-source email marketing and lead management software that helps you create customized email templates and email campaigns. It is an alternative to other email service providers, like MailChimp, and can be integrated with third-party SMTP relay services, like Gmail, Mandrill, Sendgrid, and others. Mautic offers a rich set of features, including customizable dripflow programs, marketing campaigns, social media monitoring, and many more.

In this tutorial, we will show you how to install Mautic Marketing Automation Tool on Ubuntu 20.04.

Prerequisites

  • A fresh Ubuntu 20.04 VPS on the Atlantic.net Cloud Platform
  • A root password configured on your server

Step 1 – Create Atlantic.Net Cloud Server

First, log in to your Atlantic.Net Cloud Server. Create a new server, choosing Ubuntu 20.04 as the operating system with at least 1GB RAM. Connect to your Cloud Server via SSH and log in using the credentials highlighted at the top of the page.

Once you are logged in to your Ubuntu 20.04 server, run the following command to update your base system with the latest available packages.

apt-get update -y

Step 2 – Install Apache, MariaDB, and PHP

First, you will need to install Apache web server and MariaDB in your server. You can install them using the following command:

apt-get install apache2 mariadb-server -y

Once both packages are installed, you will also need to install PHP version 7.2 on your server.

By default, Ubuntu 20.04 ships with PHP version 7.4, so you will need to add the Ondrej PHP repository in your system.

You can add it with the following command:

apt-get install software-properties-common -y
add-apt-repository ppa:ondrej/php
apt-get update -y

Once the repository is added, install PHP with all required extensions by running the following command:

apt-get install php7.2 libapache2-mod-php7.2 php7.2-common php7.2-gmp php7.2-curl php7.2-intl
php7.2-mbstring php7.2-xmlrpc php7.2-mysql php7.2-bcmath php7.2-gd php7.2-xml php7.2-cli
php7.2-zip php7.2-imap curl git -y

After installing PHP, edit the php.ini file and change some desired settings:

nano /etc/php/7.2/apache2/php.ini

Change the following lines:

memory_limit = 512M
upload_max_filesize = 100M
max_execution_time = 360
date.timezone = America/Chicago


Save and close the file then restart Apache web service to apply the changes:

systemctl restart apache2

Step 3 – Configure Database for Mautic

First, log in to MariaDB shell with the following command:

mysql

Once logged in, create a database and user for Mautic with the following command:

CREATE DATABASE mauticdb;
CREATE USER 'mauticuser'@'localhost' IDENTIFIED BY 'password';

Next, grant all the privileges to the Mautic database with the following command:

GRANT ALL ON mauticdb.* TO 'mauticuser'@'localhost' IDENTIFIED BY 'password' WITH 
GRANT OPTION;

Next, flush the privileges and exit from the MariaDB shell with the following command:

FLUSH PRIVILEGES;
EXIT;

Step 4 – Download Mautic

First, change the directory to the Apache web root directory and download the latest version of the Mautic from the Git Hub using the following command:

cd /var/www/html
git clone https://github.com/mautic/mautic.git

Once downloaded, install the Composer in your system with the following command:

curl -sS https://getcomposer.org/installer | php -- --install-dir=/usr/local/bin --filename=composer

Next, change the directory to mautic and install all PHP dependencies with the following command:

cd mautic
composer install

Next, change the ownership of the mautic to www-data and set proper permissions with the following command:

chown -R www-data:www-data /var/www/html/mautic/
chmod -R 755 /var/www/html/mautic/

Step 5 – Configure Apache for Mautic

First, create an Apache virtual host configuration file to serve Mautic.

nano /etc/apache2/sites-available/mautic.conf

Add the following lines:

<VirtualHost *:80>
ServerAdmin [email protected]
DocumentRoot /var/www/html/mautic
ServerName example.com
ServerAlias www.example.com

<Directory /var/www/html/mautic/>
Options +FollowSymlinks
AllowOverride All
Require all granted
</Directory>

ErrorLog ${APACHE_LOG_DIR}/error.log
CustomLog ${APACHE_LOG_DIR}/access.log combined

</VirtualHost>

Save and close the file, then enable the Mautic virtual host file and rewrite module with the following command:

a2ensite mautic.conf
a2enmod rewrite

Next, restart the Apache web service to apply the changes:

systemctl restart apache2

Step 6 – Access Mautic Web UI

At this point, Mautic is installed. Now, open your web browser and access the Mautic web UI using the URL http://example.com. You should see the following screen:

Click on the Next Step button. You should see the following screen:

Provide your Mautic database details and click on the Next Step button. You should see the following screen:

Provide your Mautic admin username, email, and password and click on the Next Step button. You should see the following screen:

Provide your desired SMTP settings and click on the Next Step button. You will be redirected to the Mautic login screen:

Provide your Mautic admin username and password and click on the login button. You should see the Mautic dashboard in the following screen:

Conclusion

Congratulations! You have successfully installed Mautic on Ubuntu 20.04. You can now install additional plugins to extend the functionality of Mautic and create your own email campaigns; try it out on VPS Hosting from Atlantic.Net.

Get A Free To Use Cloud VPS

Free Tier Includes:
G3.2GB Cloud VPS Free to Use for One Year
50 GB of Block Storage Free to Use for One Year
50 GB of Snapshots Free to Use for One Year


Looking for a Hosting Solution?

We Provide Cloud, Dedicated, & Colocation.

  • Seven Global Data Center Locations.
  • Flexible Private, Public, & Hybrid Hosting.
  • 24x7x365 Security, Support, & Monitoring.
Contact Us Now! Med Tech Award FTC
SOC Audit HIPAA Audit HITECH Audit

Recent Posts

What Digital Transformations Are Coming to Healthcare?
Rocky Linux Cloud VPS Hosting Is Now Available at All Seven Data Center Locations!
Top 10 Database Offerings
Should You Choose an AMD or Intel-Based Dedicated Server?
Post-Pandemic: Top Cybersecurity Threats to Healthcare Security

Get started with 12 months of free cloud VPS hosting

Free Tier includes:
G3.2GB Cloud VPS Server Free to Use for One Year
50 GB of Block Storage Free to Use for One Year
50 GB of Snapshots Free to Use for One Year


New York, NY

100 Delawanna Ave, Suite 1

Clifton, NJ 07014

United States

San Francisco, CA

2820 Northwestern Pkwy,

Santa Clara, CA 95051

United States

Dallas, TX

2323 Bryan Street,

Dallas, Texas 75201

United States

Ashburn, VA

1807 Michael Faraday Ct,

Reston, VA 20190

United States

Orlando, FL

440 W Kennedy Blvd, Suite 3

Orlando, FL 32810

United States

Toronto, Canada

20 Pullman Ct, Scarborough,

Ontario M1X 1E4

Canada

London, UK

14 Liverpool Road, Slough,

Berkshire SL1 4QZ

United Kingdom

Resources