---
title: 'Install Mautic via Composer'
url: 'https://johnlinhart.com/blog/install-mautic-via-composer'
markdown: 'https://johnlinhart.com/blog/install-mautic-via-composer.md'
date: '2020-01-04'
description: "Hey, don't read the rest of this old, out dated article. Mautic can already do this and it's the preferred way: https://docs.mautic.org/en/setup/how-to-install-mautic/install-and-manage-mautic-with-composer The original article: I just tested installing Mautic with Composer and it worked pretty wel…"
taxonomy:
  tag:
    - personal
    - mautic
    - developer
    - technology
    - composer
    - 'web development'
  archives_month:
    - jan_2020
  archives_year:
    - '2020'
---

# Install Mautic via Composer

[ Blog ](https://johnlinhart.com/)      Install Mautic via Composer    

   04 *Jan*   
#### [Install Mautic via Composer](https://johnlinhart.com/blog/install-mautic-via-composer)

  [personal](https://johnlinhart.com/tag:personal) [mautic](https://johnlinhart.com/tag:mautic) [developer](https://johnlinhart.com/tag:developer) [technology](https://johnlinhart.com/tag:technology) [composer](https://johnlinhart.com/tag:composer) [web development](https://johnlinhart.com/tag:web%20development)  

**Hey, don't read the rest of this old, out dated article. Mautic can already do this and it's the preferred way:**

[https://docs.mautic.org/en/setup/how-to-install-mautic/install-and-manage-mautic-with-composer](https://docs.mautic.org/en/setup/how-to-install-mautic/install-and-manage-mautic-with-composer "This link will take you to an external web site. We are not responsible for their content.")

**The original article:**

I just tested installing Mautic with Composer and it worked pretty well. Why isn't it the recommended way? Am I missing something? This is a follow up to [how I failed installing Mautic with composer as a dependency](https://johnlinhart.com/blog/how-i-failed-installing-mautic-with-composer). We can install Mautic in the same file structure as we are used to now with Composer.

The reason I'm playing with this is because I work on the [Mautic Marketplace](https://johnlinhart.com/blog/mautic-marketplace-proposal) and I face an issue that all the plugins listed at Packagist are for Mautic 2. They must define what Mautic version they are for otherwise installing such plugin will break the Mautic installation. However, the `mautic/core` package is not listed at Packagist so the plugins cannot define the supported Mautic versions.

But let's get back to the other reason why Mautic should be listed at Packagist - how to install Mautic.

### The currently recommended way

At this point if you look at the [readme of Mautic](https://github.com/mautic/mautic#getting-started "This link will take you to an external web site. We are not responsible for their content.") you'll see that the recommended way how to install Mautic is to visit [https://www.mautic.org/download](https://www.mautic.org/download "This link will take you to an external web site. We are not responsible for their content."), fill in the form to get the production zip package and then somehow upload it to the server. Someone will unzip it locally and FTP it one file after another to the server. Someone else will use a command like rsync to upload the zip file and then another command to extract it. Isn't that too much work?

### The Git way

If you want to make changes to Mautic core and then provide the changes to the community or if you are building a plugin, use Git to install Mautic (`git clone git@github.com:mautic/mautic.git && composer install`). I want to focus on production installations in this post. Do not use Git to install Mautic in production.

### The Composer way

It's as easy as executing this command:

```
composer create-project mautic/core mautic-dir-name ^2 --no-dev
```

If `composer` is an unknown command, [install it first](https://getcomposer.org/doc/00-intro.md#installation-linux-unix-macos "This link will take you to an external web site. We are not responsible for their content."). Replace the `mautic-dir-name` with the directory where Mautic should be installed in. The `^2` part means that you want to install the latest Mautic 2 version.

There are unresolved issues like when the production package is being built then some files are [being removed](https://github.com/mautic/mautic/blob/staging/build/processfiles.php "This link will take you to an external web site. We are not responsible for their content.") as they are not needed in production. Some files like [upgrade.php](https://github.com/mautic/mautic/blob/staging/upgrade.php "This link will take you to an external web site. We are not responsible for their content.") and [index\_dev,php](https://github.com/mautic/mautic/blob/staging/index_dev.php "This link will take you to an external web site. We are not responsible for their content.") might be removed for security reasons. But we should be able to do all this in [post-create-project-cmd](https://getcomposer.org/doc/articles/scripts.md#command-events "This link will take you to an external web site. We are not responsible for their content.").

 [ Next Post](https://johnlinhart.com/blog/splfixedarray-vs-array-array_map-vs-foreach) [Previous Post ](https://johnlinhart.com/blog/how-i-failed-installing-mautic-with-composer)

#### Projects I'm part of

 **[Mautic](http://mautic.org)** Open source marketing automation software.
 **[Calculoid.com](http://calculoid.com)** Web app which lets you create a calculator.
 **[eScope.cz](http://escope.cz/en)** My Joomla! articles and extensions.
 **[CRMery](http://crmery.com)** CRM as Joomla component.
 **[Constimator.com](http://constimator.com)** Web app which lets you calculate cost of building. 

#### For stalkers

 [](https://github.com/escopecz "GitHub") [](https://twitter.com/jan_linhart "Twitter") [](http://stackoverflow.com/users/2421302/escopecz "Stack Overflow") [](https://cz.linkedin.com/pub/jan-linhart/52/a03/80a "LinkedIn") [](http://magazine.joomla.org/component/k2/itemlist/user/5517-janlinhart "Joomla Magazine") 

#### Popular Tags

  [mautic](https://johnlinhart.com/tag:mautic) [developer](https://johnlinhart.com/tag:developer) [technology](https://johnlinhart.com/tag:technology) [web development](https://johnlinhart.com/tag:web%20development) [notes](https://johnlinhart.com/tag:notes) [composer](https://johnlinhart.com/tag:composer) [marketing](https://johnlinhart.com/tag:marketing) [personal](https://johnlinhart.com/tag:personal) [cronfig](https://johnlinhart.com/tag:cronfig) [hobby](https://johnlinhart.com/tag:hobby) [webexpo](https://johnlinhart.com/tag:webexpo) [freelance](https://johnlinhart.com/tag:freelance) [cost](https://johnlinhart.com/tag:cost) [calculator](https://johnlinhart.com/tag:calculator) [rate](https://johnlinhart.com/tag:rate) [calculoid](https://johnlinhart.com/tag:calculoid) [wordpress](https://johnlinhart.com/tag:wordpress) [grav](https://johnlinhart.com/tag:grav) [pagekit](https://johnlinhart.com/tag:pagekit) [cms](https://johnlinhart.com/tag:cms) [john](https://johnlinhart.com/tag:john) [name](https://johnlinhart.com/tag:name) 

#### Archives

- [ 1 November 2024  ](https://johnlinhart.com/blog/archives_month:nov_2024)
- [ 1 October 2024  ](https://johnlinhart.com/blog/archives_month:oct_2024)
- [ 5 March 2023  ](https://johnlinhart.com/blog/archives_month:mar_2023)
- [ 1 January 2020  ](https://johnlinhart.com/blog/archives_month:jan_2020)
- [ 2 December 2019  ](https://johnlinhart.com/blog/archives_month:dec_2019)
- [ 1 September 2019  ](https://johnlinhart.com/blog/archives_month:sep_2019)
- [ 1 August 2018  ](https://johnlinhart.com/blog/archives_month:aug_2018)
- [ 1 November 2016  ](https://johnlinhart.com/blog/archives_month:nov_2016)
- [ 1 September 2015  ](https://johnlinhart.com/blog/archives_month:sep_2015)
- [ 1 June 2015  ](https://johnlinhart.com/blog/archives_month:jun_2015)
- [ 1 May 2015  ](https://johnlinhart.com/blog/archives_month:may_2015)
- [ 1 April 2015  ](https://johnlinhart.com/blog/archives_month:apr_2015)

#### Syndicate

 [ Atom 1.0](https://johnlinhart.com/blog.atom) [ RSS](https://johnlinhart.com/blog.rss)

---

## Navigation

- Parent: [Blog](https://johnlinhart.com/index.md)
- Previous: [SplFixedArray vs Array, array_map vs foreach](https://johnlinhart.com/blog/splfixedarray-vs-array-array_map-vs-foreach.md)
- Next: [How I failed installing Mautic with Composer](https://johnlinhart.com/blog/how-i-failed-installing-mautic-with-composer.md)
