Setting Mautic Afloat in the Cloud

For the past couple of weeks, I’ve been working with Mautic, the open-source inbound marketing automation tool. Thus far I’ve set up Mautic on:

  1. Cloud 9 development environment
  2. Heroku (unsuccessfully – see below)
  3. Digital Ocean Droplet
  4. GoDaddy Virtual Private Server

With the current version, Mautic dropped support for Postgres, which seems to be the database of choice for Heroku (I set up one of our Epicodus group projects there and had to migrate the database from MySQL to Postgres), and trying to get the app to work with CloudDB and Google SQL weren’t terribly successful. So, no Heroku for you. Or for me.

Skinny Dipping in the Digital Ocean

Thus far, the Digital Ocean Droplet seems to have been the least PITA, although it did take a bit of doing to get folder permissions and Apache configurations set up properly. For future reference:

GoDaddy, Go!

While Googling installation issues for Mautic on GoDdaddy’s Virtual Private Server, I’d noticed that a good portion of responses flat out state to stay the hell away from GoDaddy. Not that it’s necessarily applicable to a “vanilla” install of Mautic, but GoDaddy does not support PHP7 (although they may do so in the coming months – no firm ETA). I did hover over someone’s shoulder while they navigated through some amazing flaming hoops to get PHP7 on a GD VPS (phpbrew to the rescue). I used the EasyApache web GUI on GoDaddy’s WHM (WebHost Manager) to change the PHP version to 5.6 (which Mautic requires) and to enable a couple of required add-ons (mbstring and fileinfo)… and waited 20 minutes for Apache and PHP to be rebuilt.

Apache, Easy?

Run update first before doing any of the EasyApache stuff, as the build process can crap out.

More php.ini settings to tweak:

  • always_populate_raw_post_data=-1
  • memory_limit = 256M
  • max_execution_time=300

Some of these can be done through EasyApache; others you’ll have to php –ini to find the file and nano that booger (good luck sorting through the lines of settings to find ’em: grep -n is your friend). The latter two settings seemed to help when using Composer to build out your vendor directory.

GoDaddy’s VPS requires you to create a cPanel user through the WHM in order to publish a site, and juggling permissions (e.g., passing root privileges between the cPanel user and the “root” user) can be a tad confusing. I’d found configuring Apache through a .conf on Digital Ocean to be a bit more straightforward, but both get the job done.

Bouncy, Bouncy, Big and Bouncy

Outbound emails – your development instance will probably not successfully send emails, as they’ll either end up in the recipient’s spam box or be filtered automatically. I’ve configured third party email accounts (standard IMAP/POP/SMTP mail and Office365) to relay outbound messages for Mautic. It’s also possible to use the VPS itself as the outbound server – GoDaddy allows a set number of relays per day, which may be more than sufficient for small scale implementations – bigger outbound loads may require services like MailChimp or Amazon SES.

One last tweak to make – Mautic doesn’t like group write access on its index.php file. We had to look at the error logs through cPanel to get this detail for the 500 error that was thrown.

Anything else? GD’s VPS is on CentOS, so no apt-get, it’s all yum.