{"id":3142,"date":"2020-12-15T14:29:18","date_gmt":"2020-12-15T14:29:18","guid":{"rendered":"https:\/\/servicesground.com\/?p=3142"},"modified":"2021-02-25T19:15:34","modified_gmt":"2021-02-25T19:15:34","slug":"how-to-build-and-configure-mautic-3-email-marketing-system","status":"publish","type":"post","link":"https:\/\/servicesground.com\/blog\/how-to-build-and-configure-mautic-3-email-marketing-system\/","title":{"rendered":"Build And Configure Mautic 3 Email Marketing System"},"content":{"rendered":"\r\n
How To Build And Configure Mautic 3, Mautic<\/a> is an open-source, marketing automation system and is widely used as an automated email marketing solution<\/a>.<\/p>\r\n\r\n\r\n\r\n If you have a little bit of experience in email marketing then you\u2019ll be familiar with the email marketing plans consist of two parts:<\/p>\r\n\r\n\r\n\r\n The Sender:<\/strong>\u00a0this is the technical part of the SMTP server. You can send emails with the permission of this server online.\u00a0<\/p>\r\n\r\n\r\n\r\n An Administration software<\/strong>: where you can configure and manage your email list, advertising campaigns, monitor and analyze results, manage your sending servers, and so on. So, we can connect both to get an email marketing plan.\u00a0<\/p>\r\n\r\n\r\n\r\n In this article, I\u2019ll show you how to build Mautic and here the administration is Mautic<\/a>.\u00a0<\/p>\r\n\r\n\r\n\r\n To build Mautic we should have two things:<\/p>\r\n\r\n\r\n\r\n First Get A VPS Server<\/a>\u00a0<\/strong><\/p>\r\n\r\n\r\n\r\n You are required to get a VPS server first to install Mautic on. You can get a VPS server from the company of your own choice. Moving on, we\u2019ll use Contabo services in this guide.\u00a0<\/p>\r\n\r\n\r\n\r\n After you get the VPS server just create a server with the following specifications:<\/p>\r\n\r\n\r\n\r\n If you don\u2019t have a domain then getting a domain is just a piece of cake. All you just need to go to any of the domain registration company and buy a domain name. Here are the names of some company from where you can get your domain register:<\/p>\r\n\r\n\r\n\r\n GodaddyEnom<\/strong><\/p>\r\n\r\n\r\n\r\n Freenom<\/strong><\/p>\r\n\r\n\r\n\r\n Namecheap<\/strong><\/p>\r\n\r\n\r\n\r\n Point Domain to VPS<\/a>.<\/strong><\/p>\r\n\r\n\r\n\r\n Before proceeding, you\u2019ve to point your domain or subdomain to your IP address. But here I\u2019ll point subdomain \u201cmautic.example.me\u201d to my Contabo<\/a><\/strong> IP address. OK now we have a domain and VPS server, let’s start the installation process.\u00a0<\/p>\r\n\r\n\r\n\r\n You can use an SSH client like putty to connect to your server and also\u00a0Install Apache, PHP, and MySQL\u00a0which are the pre requests for hosting any PHP application like mautic<\/a>.<\/p>\r\n\r\n\r\n\r\n Install Apache Web Server on your VPS<\/a> by running the following command:<\/p>\r\n\r\n\r\n\r\n After the installation complete, enable the service by running the following command.<\/p>\r\n\r\n\r\n\r\n Then inspect the working of Apache on your server by browsing the VPS IP address (http:\/\/Your_IP_Address).<\/p>\r\n\r\n\r\n\r\n The default page should be like this:<\/p>\r\n\r\n\r\n\r\n Mautic also requires a Database to save data because it\u2019s working is not much different from PHP System.<\/p>\r\n\r\n\r\n\r\n To install MariaDB run the commands below (Choose between Ubuntu 16,18):<\/p>\r\n\r\n\r\n\r\n You can stop MariaDB by running the following command.<\/p>\r\n\r\n\r\n\r\n After that, create a root password and disallow the remote root to secure your MariaDB by running the following command.<\/p>\r\n\r\n\r\n\r\n When prompted, enter these answers:<\/p>\r\n\r\n\r\n\r\n To test if MariaDB is installed, type the command below to logon to MariaDB server<\/p>\r\n\r\n\r\n\r\n Then login by typing the password you created above. If it works you\u2019ll receive the welcome message like this:<\/p>\r\n\r\n\r\n\r\n Mautic is a PHP based script so, we have to install some modules and PHP on the server. In this guide, we\u2019ll install PHP 7.4 but you can use any version you want. Just change \u201c7.4\u201d to 7.X\u201d in the commands.<\/p>\r\n\r\n\r\n\r\n Add the repository of the third party to install PHP 7.4 by running the following command.<\/p>\r\n\r\n\r\n\r\n After that update this:<\/p>\r\n\r\n\r\n\r\n Then install PHP 7.4 and related modules. By running the following commands<\/p>\r\n\r\n\r\n\r\n Run the following command:<\/p>\r\n\r\n\r\n\r\n Now you\u2019ve installed PHP, Open\u00a0WinSCP<\/a>\u00a0to edit the php.ini file. WinSCP works over SSH so, it will make things a lot easier with putty.<\/p>\r\n\r\n\r\n\r\n Apply changes by following these guidelines:<\/p>\r\n\r\n\r\n\r\n Now our server is ready to install so, we need to create a Database for Mautic in MariaDB.<\/p>\r\n\r\n\r\n\r\n To login, MariaDB MySql database server we\u2019ve to run the following commands.<\/p>\r\n\r\n\r\n\r\n Then create a database called\u00a0mautic<\/strong>\u00a0(or any name you want)<\/p>\r\n\r\n\r\n\r\n Create a database user called\u00a0mautic<\/strong>\u00a0with a new password<\/p>\r\n\r\n\r\n\r\n Then grant the user full access to the database.<\/p>\r\n\r\n\r\n\r\n Finally, save your changes and exit.<\/p>\r\n\r\n\r\n\r\n To get the latest version of Mautic you can use Github repository. So, install composer, Curl and other dependencies.<\/p>\r\n\r\n\r\n\r\n Run these commands for installation.<\/p>\r\n\r\n\r\n\r\n When the operation finishes, replace the directory with\u00a0\u201c\/var\/www\/html\u201d\u00a0by running the following command:<\/p>\r\n\r\n\r\n\r\n Then Download Mautic package:<\/p>\r\n\r\n\r\n\r\n Now Install Mautic by running the following commands:<\/p>\r\n\r\n\r\n\r\n After the installation finishes, get the permission to set some files by running the following commands.<\/p>\r\n\r\n\r\n\r\n Now we\u2019ve installed the Mautic. So, you\u2019ve to configure Apache to access the Mautic by using your domain name. How To Build And Configure Mautic 3.<\/p>\r\n\r\n\r\n\r\n In order to do so first follow the below steps:<\/p>\r\n\r\n\r\n\r\n Now finish the setup by running the following Setup to How To Build And Configure Mautic 3.<\/p>\r\n\r\n\r\n\r\n Now go to the Web browser and navigate to your server name like this:<\/p>\r\n\r\n\r\n\r\n \/\/mautic.example.com<\/p>\r\n\r\n\r\n\r\n You must see the setup completion wizard below:<\/p>\r\n\r\n\r\n\r\n Enter the database and your admin login information to continue the setup process.<\/p>\r\n\r\n\r\n\r\n Now we\u2019ve installed the Mautic, we just need to setup the Cron jobs.<\/p>\r\n\r\n\r\n\r\n Simply Cron Jobs is an organized activity that works automatically on a schedule.<\/p>\r\n\r\n\r\n\r\n For example, if you create an automated email campaign that run every week. You need a function that will automatically runs in the background to boost this campaign, this is the Cron job role, so do the setup.<\/p>\r\n\r\n\r\n\r\n Mautic needs many Cron functions, some are required and some are optional, check out the list of all Cron jobs here in mautic. All you just have to copy the jobs below and paste them on your server to put them into action.<\/p>\r\n\r\n\r\n\r\n SSL certificates are used to encrypt the traffic between the server and client, providing additional security for users accessing your application. Let’s Encrypt provides an easy way to install trusted certificates for free.<\/p>\r\n\r\n\r\n\r\n Connect to your server using the Putty SSH client.<\/p>\r\n\r\n\r\n\r\n You can get the Let\u2019s Encrypt Certificate through client software running on your server.<\/p>\r\n\r\n\r\n\r\n First, add the repository to install Cerbot (official client):<\/p>\r\n\r\n\r\n\r\n You\u2019ll need to press\u00a0ENTER\u00a0to accept.<\/p>\r\n\r\n\r\n\r\n Then, to get the new package info just update the list.<\/p>\r\n\r\n\r\n\r\n Install Certbot\u2019s Apache package:<\/p>\r\n\r\n\r\n\r\n Certbot\u00a0<\/strong>is now ready to be used.<\/p>\r\n\r\n\r\n\r\n Cerbot is quite easy to generate the SSL certificate for Apache. A new SSL certificate will be provided automatically to the client that is valid for the domains which are provided in the form of parameters.<\/p>\r\n\r\n\r\n\r\n Then you\u2019ve to provide an email address for lost key recovery and notices to get the authority to choose between enabling both\u00a0http\u00a0and\u00a0https\u00a0access or forcing all requests to redirect to\u00a0https. If you don\u2019t have a specific need for unencrypted traffic then it will be safest to require.<\/p>\r\n\r\n\r\n\r\n Test your website now. Here I\u2019ll test my website by browsing this \u201chttps:\/\/mautic.example.com\u201d This is the guide about How To Build And Configure Mautic 3.<\/p>\r\n\r\n\r\n\r\n Good Luck! Mautic How To Build And Configure Mautic 3, Mautic is an open-source, marketing automation system and is widely used as an automated email marketing solution. What do we mean by automated email marketing? If you have a little bit of experience in email marketing then you\u2019ll be familiar with the email marketing plans consist of […]<\/p>\n","protected":false},"author":24,"featured_media":3151,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1418],"tags":[1554,1592,1590,1593,1589,1598,1591,1596,1595,1594,1597],"yst_prominent_words":[],"class_list":["post-3142","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-email-marketing","tag-contabo","tag-email-marketing-solution","tag-email-marketing-system","tag-get-ready-to-install-mautic","tag-how-to-build-and-configure-mautic-3","tag-how-to-build-and-configure-mautic-3-2","tag-mautic","tag-mautic-download","tag-mautic-download-free","tag-mautic-installation","tag-mautic-pricing"],"_links":{"self":[{"href":"https:\/\/servicesground.com\/blog\/wp-json\/wp\/v2\/posts\/3142","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/servicesground.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/servicesground.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/servicesground.com\/blog\/wp-json\/wp\/v2\/users\/24"}],"replies":[{"embeddable":true,"href":"https:\/\/servicesground.com\/blog\/wp-json\/wp\/v2\/comments?post=3142"}],"version-history":[{"count":29,"href":"https:\/\/servicesground.com\/blog\/wp-json\/wp\/v2\/posts\/3142\/revisions"}],"predecessor-version":[{"id":5148,"href":"https:\/\/servicesground.com\/blog\/wp-json\/wp\/v2\/posts\/3142\/revisions\/5148"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/servicesground.com\/blog\/wp-json\/wp\/v2\/media\/3151"}],"wp:attachment":[{"href":"https:\/\/servicesground.com\/blog\/wp-json\/wp\/v2\/media?parent=3142"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/servicesground.com\/blog\/wp-json\/wp\/v2\/categories?post=3142"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/servicesground.com\/blog\/wp-json\/wp\/v2\/tags?post=3142"},{"taxonomy":"yst_prominent_words","embeddable":true,"href":"https:\/\/servicesground.com\/blog\/wp-json\/wp\/v2\/yst_prominent_words?post=3142"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}What do we mean by automated email marketing?<\/strong><\/h4>\r\n\r\n\r\n\r\n
<\/figure>\r\n\r\n\r\n\r\n
Get Ready To Install Mautic<\/strong><\/h2>\r\n\r\n\r\n\r\n
The requirement to build Mautic\u00a0<\/strong><\/h2>\r\n\r\n\r\n\r\n
\r\n
\r\n
Get a Domain Name<\/strong><\/h2>\r\n\r\n\r\n\r\n
Install Apache2 Web Server<\/strong><\/h2>\r\n\r\n\r\n\r\n
sudo apt update\r\nsudo apt install apache2<\/code><\/pre>\r\n\r\n\r\n\r\n
sudo systemctl restart apache2.service\r\nsudo systemctl enable apache2.service<\/code><\/pre>\r\n\r\n\r\n\r\n
<\/figure>\r\n\r\n\r\n\r\n
Install MariaDB (MySQL) Database Server<\/strong><\/h2>\r\n\r\n\r\n\r\n
Run these on Ubuntu\u00a016\u00a0LTS<\/strong>:<\/h4>\r\n\r\n\r\n\r\n
sudo apt-get install software-properties-common gnupg-curl<\/code><\/pre>\r\n\r\n\r\n\r\n
sudo apt-key adv --fetch-keys 'https:\/\/mariadb.org\/mariadb_release_signing_key.asc'<\/code><\/pre>\r\n\r\n\r\n\r\n
sudo add-apt-repository 'deb [arch=amd64,arm64,i386,ppc64el] http:\/\/mirrors.piconets.webwerks.in\/mariadb-mirror\/repo\/10.5\/ubuntu xenial main'<\/code><\/pre>\r\n\r\n\r\n\r\n
sudo apt update<\/code><\/pre>\r\n\r\n\r\n\r\n
sudo apt-get install mariadb-server<\/code><\/pre>\r\n\r\n\r\n\r\n
Run these on Ubuntu\u00a018\u00a0LTS:<\/strong><\/h4>\r\n\r\n\r\n\r\n
sudo apt-get install software-properties-common<\/code><\/pre>\r\n\r\n\r\n\r\n
sudo apt-key adv --fetch-keys 'https:\/\/mariadb.org\/mariadb_release_signing_key.asc'<\/code><\/pre>\r\n\r\n\r\n\r\n
sudo add-apt-repository 'deb [arch=amd64,arm64,ppc64el] http:\/\/mirrors.piconets.webwerks.in\/mariadb-mirror\/repo\/10.5\/ubuntu bionic main'<\/code><\/pre>\r\n\r\n\r\n\r\n
sudo apt update<\/code><\/pre>\r\n\r\n\r\n\r\n
sudo apt-get install mariadb-server<\/code><\/pre>\r\n\r\n\r\n\r\n
Run these on Ubuntu\u00a016\u00a0LTS<\/strong><\/h4>\r\n\r\n\r\n\r\n
sudo systemctl stop mysql.service\r\nsudo systemctl start mysql.service\r\nsudo systemctl enable mysql.service<\/code><\/pre>\r\n\r\n\r\n\r\n
Run these on Ubuntu\u00a018\u00a0LTS<\/strong><\/h4>\r\n\r\n\r\n\r\n
sudo systemctl stop mariadb.service\r\nsudo systemctl start mariadb.service\r\nsudo systemctl enable mariadb.service<\/code><\/pre>\r\n\r\n\r\n\r\n
sudo mysql_secure_installation<\/code><\/pre>\r\n\r\n\r\n\r\n
\r\n
Restart MariaDB Mysql Service<\/strong><\/h4>\r\n\r\n\r\n\r\n
sudo mysql -u root -p<\/code><\/pre>\r\n\r\n\r\n\r\n
<\/figure>\r\n\r\n\r\n\r\n
\r\n
sudo apt-get install software-properties-common\r\nsudo add-apt-repository ppa:ondrej\/php<\/code><\/pre>\r\n\r\n\r\n\r\n
sudo apt update<\/code><\/pre>\r\n\r\n\r\n\r\n
sudo apt install php7.4 libapache2-mod-php7.4 php7.4-common php7.4-gmp php7.4-curl php7.4-intl php7.4-mbstring php7.4-xmlrpc php7.4-mysql php7.4-bcmath php7.4-gd php7.4-xml php7.4-cli php7.4-zip php7.4-imap<\/code><\/pre>\r\n\r\n\r\n\r\n
sudo apt install php-pcov<\/code><\/pre>\r\n\r\n\r\n\r\n
\r\n
<\/figure>\r\n\r\n\r\n\r\n
\r\n
file_uploads = On\r\nallow_url_fopen = On\r\nshort_open_tag = On\r\nmemory_limit = 256M \/\/You can increase this if you server can handle\r\nupload_max_filesize = 100M\r\nmax_execution_time = 360\r\ndate.timezone = America\/NewYork \/\/Set your Time Zone here<\/code><\/pre>\r\n\r\n\r\n\r\n
\r\n
sudo systemctl restart apache2.service<\/code><\/pre>\r\n\r\n\r\n\r\n
\r\n
sudo mysql -u root -p<\/code><\/pre>\r\n\r\n\r\n\r\n
CREATE DATABASE mautic;<\/code><\/pre>\r\n\r\n\r\n\r\n
CREATE USER 'mautic'@'localhost' IDENTIFIED BY 'Enter_Your_Password_Here'<\/code><\/pre>\r\n\r\n\r\n\r\n
GRANT ALL ON mautic.* TO 'mautic'@'localhost' IDENTIFIED BY 'Enter_your_password_here' WITH GRANT OPTION;<\/code><\/pre>\r\n\r\n\r\n\r\n
FLUSH PRIVILEGES;\r\nEXIT<\/pre>\r\n\r\n\r\n\r\n
\r\n
#First Command:\r\nsudo apt install curl git\r\n\r\n#Second Command:\r\ncurl -sS https:\/\/getcomposer.org\/installer | sudo php -- --install-dir=\/usr\/local\/bin --filename=composer --version=1.10.13<\/code><\/pre>\r\n\r\n\r\n\r\n
cd \/var\/www\/html<\/code><\/pre>\r\n\r\n\r\n\r\n
sudo git clone https:\/\/github.com\/mautic\/mautic.git<\/code><\/pre>\r\n\r\n\r\n\r\n
cd \/var\/www\/html\/mautic\r\n\r\nsudo composer instal<\/pre>\r\n\r\n\r\n\r\n
sudo chown -R www-data:www-data \/var\/www\/html\/mautic\/\r\n\r\nsudo chmod -R 755 \/var\/www\/html\/mautic\/<\/code><\/pre>\r\n\r\n\r\n\r\n
Configure Apache2 Web Server<\/strong><\/h4>\r\n\r\n\r\n\r\n
\r\n
<\/figure>\r\n\r\n\r\n\r\n
\r\n
<VirtualHost *:80>\r\n ServerAdmin admin@mautic.example.com\r\n DocumentRoot \/var\/www\/html\/mautic\r\n ServerName mautic.example.com\r\n ServerAlias mautic.example.com\r\n\r\n <Directory \/var\/www\/html\/mautic\/>\r\n Options +FollowSymlinks\r\n AllowOverride All\r\n Require all granted\r\n <\/Directory>\r\n\r\n ErrorLog ${APACHE_LOG_DIR}\/error.log\r\n CustomLog ${APACHE_LOG_DIR}\/access.log combined\r\n\r\n<\/VirtualHost><\/code><\/pre>\r\n\r\n\r\n\r\n
\r\n
sudo a2ensite mautic.example.com.conf\r\n\r\nsudo a2enmod rewrite\r\n\r\nsudo systemctl restart apache2.service<\/code><\/pre>\r\n\r\n\r\n\r\n
<\/figure>\r\n\r\n\r\n\r\n
\r\n
What are Cron Jobs?<\/strong><\/h4>\r\n\r\n\r\n\r\n
#Segments Every 2 Minutes\r\n*\/2 * * * * root \/usr\/bin\/php \/var\/www\/html\/mautic\/bin\/console mautic:segments:update\r\n*\/3 * * * * root \/usr\/bin\/php \/var\/www\/html\/mautic\/bin\/console mautic:import\r\n\r\n#Campaigns (Every 1 Minute)\r\n* * * * * root \/usr\/bin\/php \/var\/www\/html\/mautic\/bin\/console mautic:campaigns:update\r\n* * * * * root \/usr\/bin\/php \/var\/www\/html\/mautic\/bin\/console\r\nmautic:campaigns:trigger\r\n* * * * * root \/usr\/bin\/php \/var\/www\/html\/mautic\/bin\/console mautic:messages:send\r\n\r\n#Process Email Queue Every 5 Minutes\r\n*\/5 * * * * root \/usr\/bin\/php \/var\/www\/html\/mautic\/bin\/console mautic:emails:send\r\n#Fetch and Process Monitored Email Every 10 Minutes\r\n*\/10 * * * * root \/usr\/bin\/php \/var\/www\/html\/mautic\/bin\/console mautic:email:fetch\r\n\r\n\r\n#Process Email Queue Every 5 Minutes\r\n*\/5 * * * * root \/usr\/bin\/php \/var\/www\/html\/mautic\/bin\/console mautic:emails:send\r\n\r\n#Fetch and Process Monitored Email Every 10 Minutes\r\n*\/10 * * * * root \/usr\/bin\/php \/var\/www\/html\/mautic\/bin\/console mautic:email:fetch<\/code><\/pre>\r\n\r\n\r\n\r\n
Where to paste them?<\/strong><\/h4>\r\n\r\n\r\n\r\n
\r\n
<\/figure>\r\n\r\n\r\n\r\n
\r\n
<\/figure>\r\n\r\n\r\n\r\n
\r\n
Optional: Secure with a Free SSL<\/strong><\/h4>\r\n\r\n\r\n\r\n
Install Let\u2019s Encrypt Client<\/strong><\/h4>\r\n\r\n\r\n\r\n
sudo add-apt-repository ppa:certbot\/certbot<\/code><\/pre>\r\n\r\n\r\n\r\n
sudo apt-get update<\/code><\/pre>\r\n\r\n\r\n\r\n
sudo apt install python-certbot-apache<\/code><\/pre>\r\n\r\n\r\n\r\n
\r\n
Build SSL Certificate<\/strong><\/h4>\r\n\r\n\r\n\r\n
Simply run the following command to change the domain:<\/h4>\r\n\r\n\r\n\r\n
sudo certbot --apache -d mautic.example.com<\/code><\/pre>\r\n\r\n\r\n\r\n
If you liked this article and want to read more of these, please subscribe to our newsletter and follow us on\u00a0Facebook<\/a>,\u00a0YouTube<\/a>, and\u00a0Twitter<\/a>.<\/p>\r\n","protected":false},"excerpt":{"rendered":"