Running Mautic locally

Hello,



I am trying to install Mautic locally on my pc to be able to try it.

Can someone help me with the steps and the prerequisites needed and how to do that?



Thanks,

Lara

Hey!

Installing Mautic is relatively painless :wink:

Once you have downloaded and unzipped the package you’ll need to place the files in a directory within your local web root. If you’re using XAMPP or MAMP this is typically htdocs (somewhere on your computer). Once you navigate to this location in your browser you can then proceed through the web-based installation process.

If you have troubles along the way be sure to post them so that someone in the community can help out!

Prerequisites can be found here: https://www.mautic.org/download/requirements

Thanks!
David

Hello,

I am trying to install Mautic locally on my pc to be able to try it.
Can someone help me with the steps and the prerequisites needed and how to do that?

Thanks,
Lara

Thank you very Much David, that was very helpful :slight_smile:

I was able to reach the installer but it’s giving me a blank page after the first step while i did everything required at this stage. Any idea what could be the issue?

Thanks a mil!
Lara

Hey Lara,

What database driver are you using? Unfortunately we found some signifiant issues with non-MySql drivers that are now fixed and will be part of the next release due this week.

If you’re using MySq and getting the blank page, take a look in app/logs/mautic_prod.php. Are there errors in there? If so, can you copy them here? You may want to skim them to and mask/remove any references to database credentials, etc.

Thanks!
Alan

Hello Alan,

I tried the 3 database drivers, i’m having the same issue.

In the log files below is what shows :

“[2015-02-05 14:05:31] mautic.CRITICAL: Uncaught PHP Exception DoctrineDBALDBALException: “An exception occurred while executing ‘UPDATE users SET online_status = ? WHERE last_active <= ?’ with params [“offline”, “2015-02-05 13:50:31”]: No database selected” at C:xampphtdocsMauticWed2vendordoctrinedballibDoctrineDBALDBALException.php line 91 {“exception”:”[object] (Doctrine\DBAL\DBALException(code: 0): An exception occurred while executing ‘UPDATE users SET online_status = ? WHERE last_active <= ?’ with params [“offline”, “2015-02-05 13:50:31”]:nnNo database selected at C:\xampp\htdocs\MauticWed2\vendor\doctrine\dbal\lib\Doctrine\DBAL\DBALException.php:91, Doctrine\DBAL\Driver\Mysqli\MysqliException(code: 1046): No database selected at C:\xampp\htdocs\MauticWed2\vendor\doctrine\dbal\lib\Doctrine\DBAL\Driver\Mysqli\MysqliStatement.php:89)"} []
[2015-02-05 14:05:31] mautic.CRITICAL: Exception thrown when handling an exception (DoctrineDBALDBALException: An exception occurred while executing ‘UPDATE users SET online_status = ? WHERE last_active <= ?’ with params [“offline”, “2015-02-05 13:50:31”]: No database selected) {“exception”:"[object] (Doctrine\DBAL\DBALException(code: 0): An exception occurred while executing ‘UPDATE users SET online_status = ? WHERE last_active <= ?’ with params [“offline”, “2015-02-05 13:50:31”]:nnNo database selected at C:\xampp\htdocs\MauticWed2\vendor\doctrine\dbal\lib\Doctrine\DBAL\DBALException.php:91, Doctrine\DBAL\Driver\Mysqli\MysqliException(code: 1046): No database selected at C:\xampp\htdocs\MauticWed2\vendor\doctrine\dbal\lib\Doctrine\DBAL\Driver\Mysqli\MysqliStatement.php:89)"} []
"

And if i try to run again the web installer that’s what i get :
“Fatal error: Uncaught exception ‘DoctrineDBALDriverMysqliMysqliException’ with message ‘No database selected’ in C:xampphtdocsMauticWed2vendordoctrinedballibDoctrineDBALDriverMysqliMysqliStatement.php:89 Stack trace: #0 C:xampphtdocsMauticWed2vendordoctrinedballibDoctrineDBALDriverMysqliMysqliConnection.php(74): DoctrineDBALDriverMysqliMysqliStatement->__construct(Object(mysqli), ‘UPDATE users SE…’) #1 C:xampphtdocsMauticWed2vendordoctrinedballibDoctrineDBALConnection.php(852): DoctrineDBALDriverMysqliMysqliConnection->prepare(‘UPDATE users SE…’) #2 C:xampphtdocsMauticWed2vendordoctrineormlibDoctrineORMQueryExecSingleTableDeleteUpdateExecutor.php(55): DoctrineDBALConnection->executeUpdate(‘UPDATE users SE…’, Array, Array) #3 C:xampphtdocsMauticWed2vendordoctrineormlibDoctrineORMQuery.php(286): DoctrineORMQueryExecSingleTableDeleteUpdateExecutor->execute(Object(DoctrineDBALConnection), Array, Array) #4 C:xampphtdocsMauticWed2vendordoctri in C:xampphtdocsMauticWed2vendordoctrinedballibDoctrineDBALDBALException.php on line 91”

Hope you can help me with those :slight_smile:

Thanks,
Lara

Can you delete the app/cache/prod folder then try again? What happens?

Thanks,
Alan

I did and tried again but this time it’s now taking me to the login page directly. But i don’t have the username and password since i only reached the first step of the installation in which i enter the database information.

Is there a default username and password for login?

Thanks,
Lara

Hi Lara,

Okay, it probably started to write the config file with the database credentials so it thinks it’s installed (that will be fixed in beta4 to ensure the data is actually installed).

Anyway, delete app/cache/prod again and then also delete app/config/local.php. Then see if that gets you to the installer.

Thanks!
Alan

mautic installer for mac

https://bitnami.com/stack/mautic

Can someone tell me why I would run Mautic locally? I am messing about with Wordpress and XAMPP and a few themes and plugins etc. and really enjoying myself. Learning a lot and understanding more and more about the system and how they all play together. However I am wondering if I will see the same benefits with a local install of Mautic given that it kind of (if I’m thinking about mautic correctly) needs the net and external site visitors to really test its functionality? OR is there a way that I am currently unaware of to simulate ‘site visitors’ etc so that I can see how mautic responds to various situations on my local install. As in I put the tracking cookie and logs a new visit then I have that new visitor interact with a contact form and mautic logs that info THEN I come back (somehow) and have mautic log that as a separate visitor and log it differently.

Yeah absolutely I don’t want actual outside visitors getting to the local install. But is there a way to simulate visitors, like locally changing my IP? Or something to that affect so I can see if Mautic is acting how I want it to act?

Hello,

I run Mautic on local xampp server and I also paste configuration code in website before but the Mautic ajax response id return null
response like below -
{“success”:1,“id”:null,“sid”:“c30bca28ed919508e91ef8accff0ded58c9d4dcb”,“events”:[false]}

So, in the contact(as well as toggle anonymous) of Mautic admin I didn’t see track title and URL etc.

Note - Not able to create Mautic cookie in browser after deleting the browser history.

Thanks,
Sanjay

@SanjayJadon, the id=null is due to local IPs being filtered out in production environments. See app/bundles/CoreBundle/Helper/IpLookupHelper.php ::getIpAddress() (around line 160)