In my last post you've learned how to install WordPress on your own VPS. This time, we're going to install Mautic on the same Server. With that, you'll have a single VPS which costs you around 10$ per month with the core systems for your onlineshop and e-commerce business. If you don't have a clue on how to secure your VPS, maybe you should use hosting services like our Mautic Hosting. As soon as you deal with real-life customer data you need to ensure a certain level of security. 

We recommend Hetzner as host for your VPS. But you can also go to Services like Vultr or others.


To follow this tutorial you need to walk through the first part of this tutorial series here:
Install WordPress on a VPS.

As soon as you got everything up and running, you can start here:

Update Server

Update Package Index

apt update && apt upgrade -y

Install Mautic

First let's create a MySQL database, a database user and give the user the necessary privileges. Change test1234 to a strong password. You can use a passwordgenerator for that.

mysql -u root
CREATE USER 'mautic'@'localhost' IDENTIFIED BY 'test1234';
GRANT ALL PRIVILEGES ON mautic.* TO 'mautic'@'localhost';

Now create a folder for your Mautic installation.

mkdir /var/www/html/mautic/

Download the latest stable Mautic. Check for the latest version number on Github

wget && unzip -d /var/www/html/mautic && rm

Create the virtual hosts file for to tell the apache server where your Mautic is located and where to put the traffic. Here we use "nano" as editor:

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

Insert this into the file

<VirtualHost *:80>
    DocumentRoot /var/www/html/mautic/

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

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


Enable the new website on the server and restart apache

a2ensite mautic.conf && systemctl restart apache2

Enable the new website on the server and restart apache

certbot --apache --agree-tos --email --redirect --hsts -d

Make sure you see the success message from certbot. Otherwise something didn't work as it should. I explain that inside the video to this post as well - watch it (give it a like and comment).

Last thing to do is, to give read and write permissions to the apache user (www-data):

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

Ok. You're good to go!
Now open your Mautic within a browser and follow the onscreen instructions of the installer. These last steps are self-explanatory. If you want to have exact instructions how to do it, again, follow the video.

Comment down below if you have questions or found something what's not working for you. 
Until next time!

About the Author

Gründer und Marketing-Automation Nerd.
Er hilft Onlineshops voll automatisiert mehr zu verkaufen.
Mit der Lead & Sales Generator™ Methode generiert er qualifizierte Leads, gewinnt zufriedene Kunden und skaliert E-Commerce Businesses.
Außerdem liebt er Tee, Golf die Zeit mit seiner Familie und außergewöhnliche Geschäftskonzepte.

Leave a reply

Your email address will not be published. Required fields are marked

{"email":"Email address invalid","url":"Website address invalid","required":"Required field missing"}

Find us Here

  • Kountourioti 6, Coral Elite Residence Villa 1, Peyia, 8560, Cyprus
  • +43 660 564 1253