# Running Mautic locally

**URL:** <https://forum.mautic.org/t/running-mautic-locally/1492>\
**Category:** Product Support\
**Created:** [February 2, 2015, 3:25pm UTC](https://forum.mautic.org/t/running-mautic-locally/1492 "2015-02-02T15:25:11Z")\
**Posts on this page:** 15\
**Page:** 1

<div class="post-metadata">

**Author:** ![larach](https://avatars.discourse-cdn.com/v4/letter/l/49beb7/32.png) [@larach](https://forum.mautic.org/u/larach)\
**Post date:** [February 2, 2015, 3:25pm UTC](https://forum.mautic.org/t/running-mautic-locally/1492/1 "2015-02-02T15:25:11Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![dbhurley](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/dbhurley/32/2_2.png) [@dbhurley](https://forum.mautic.org/u/dbhurley)\
**Post date:** [February 2, 2015, 6:55pm UTC](https://forum.mautic.org/t/running-mautic-locally/1492/2 "2015-02-02T18:55:47Z")

</div>

Hey!

Installing Mautic is relatively painless 😉

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](https://www.mautic.org/download/requirements)

Thanks!  
David

---

<div class="post-metadata">

**Author:** ![larach](https://avatars.discourse-cdn.com/v4/letter/l/49beb7/32.png) [@larach](https://forum.mautic.org/u/larach)\
**Post date:** [February 2, 2015, 3:25pm UTC](https://forum.mautic.org/t/running-mautic-locally/1492/3 "2015-02-02T15:25:11Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![larach](https://avatars.discourse-cdn.com/v4/letter/l/49beb7/32.png) [@larach](https://forum.mautic.org/u/larach)\
**Post date:** [February 3, 2015, 1:26pm UTC](https://forum.mautic.org/t/running-mautic-locally/1492/4 "2015-02-03T13:26:54Z")

</div>

Thank you very Much David, that was very helpful 🙂

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

---

<div class="post-metadata">

**Author:** ![gmillard](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/gmillard/32/5_2.png) [@gmillard](https://forum.mautic.org/u/gmillard)\
**Post date:** [February 5, 2015, 4:36am UTC](https://forum.mautic.org/t/running-mautic-locally/1492/5 "2015-02-05T04:36:49Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![larach](https://avatars.discourse-cdn.com/v4/letter/l/49beb7/32.png) [@larach](https://forum.mautic.org/u/larach)\
**Post date:** [February 5, 2015, 2:09pm UTC](https://forum.mautic.org/t/running-mautic-locally/1492/6 "2015-02-05T14:09:28Z")

</div>

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 🙂

Thanks,  
Lara

---

<div class="post-metadata">

**Author:** ![gmillard](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/gmillard/32/5_2.png) [@gmillard](https://forum.mautic.org/u/gmillard)\
**Post date:** [February 5, 2015, 6:16pm UTC](https://forum.mautic.org/t/running-mautic-locally/1492/7 "2015-02-05T18:16:06Z")

</div>

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

Thanks,  
Alan

---

<div class="post-metadata">

**Author:** ![larach](https://avatars.discourse-cdn.com/v4/letter/l/49beb7/32.png) [@larach](https://forum.mautic.org/u/larach)\
**Post date:** [February 6, 2015, 8:20am UTC](https://forum.mautic.org/t/running-mautic-locally/1492/8 "2015-02-06T08:20:03Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![gmillard](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/gmillard/32/5_2.png) [@gmillard](https://forum.mautic.org/u/gmillard)\
**Post date:** [February 6, 2015, 8:24am UTC](https://forum.mautic.org/t/running-mautic-locally/1492/9 "2015-02-06T08:24:13Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![chandrasekarg](https://avatars.discourse-cdn.com/v4/letter/c/439d5e/32.png) [@chandrasekarg](https://forum.mautic.org/u/chandrasekarg)\
**Post date:** [September 25, 2015, 10:17am UTC](https://forum.mautic.org/t/running-mautic-locally/1492/10 "2015-09-25T10:17:10Z")

</div>

mautic installer for mac

[https://bitnami.com/stack/mautic](https://bitnami.com/stack/mautic)

---

<div class="post-metadata">

**Author:** ![Tyler](https://avatars.discourse-cdn.com/v4/letter/t/35a633/32.png) [@Tyler](https://forum.mautic.org/u/Tyler)\
**Post date:** [April 25, 2017, 12:30am UTC](https://forum.mautic.org/t/running-mautic-locally/1492/11 "2017-04-25T00:30:54Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![Tyler](https://avatars.discourse-cdn.com/v4/letter/t/35a633/32.png) [@Tyler](https://forum.mautic.org/u/Tyler)\
**Post date:** [April 25, 2017, 12:49am UTC](https://forum.mautic.org/t/running-mautic-locally/1492/12 "2017-04-25T00:49:33Z")

</div>

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?

---

<div class="post-metadata">

**Author:** ![SanjayJadon](https://avatars.discourse-cdn.com/v4/letter/s/779978/32.png) [@SanjayJadon](https://forum.mautic.org/u/SanjayJadon)\
**Post date:** [September 26, 2017, 1:42pm UTC](https://forum.mautic.org/t/running-mautic-locally/1492/13 "2017-09-26T13:42:18Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![restruct](https://avatars.discourse-cdn.com/v4/letter/r/ec9cab/32.png) [@restruct](https://forum.mautic.org/u/restruct)\
**Post date:** [November 22, 2017, 6:27am UTC](https://forum.mautic.org/t/running-mautic-locally/1492/14 "2017-11-22T06:27:57Z")

</div>

@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)

---

<div class="post-metadata">

**Author:** ![silavapi](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/silavapi/32/7424_2.png) [@silavapi](https://forum.mautic.org/u/silavapi)\
**Post date:** [February 2, 2020, 10:58pm UTC](https://forum.mautic.org/t/running-mautic-locally/1492/15 "2020-02-02T22:58:07Z")

</div>


