# Install via composer - cloudpanel - headaches

**URL:** https://forum.mautic.org/t/install-via-composer-cloudpanel-headaches/25176
**Category:** Mautic 4 Install/Upgrade Support
**Created:** [August 25, 2022, 5:49am UTC](https://forum.mautic.org/t/install-via-composer-cloudpanel-headaches/25176 "2022-08-25T05:49:26Z")
**Posts on this page:** 9
**Page:** 1

<div class="post-metadata">

### Author: ![tornmarketing](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/tornmarketing/32/11603_2.png) [@tornmarketing](https://forum.mautic.org/u/tornmarketing)
#### Post date: [August 25, 2022, 5:49am UTC](https://forum.mautic.org/t/install-via-composer-cloudpanel-headaches/25176/1 "2022-08-25T05:49:26Z")

</div>

Can I get some feedback on the best method from the brain trust

I want to install Mautic via a CP - tested out a few and settled on cloudpanel

Need to down step from 8.1 php to 8.0

- Done

Installing mautic via composer

> **[Installing with Composer](https://docs.mautic.org/en/setup/how-to-install-mautic/install-and-manage-mautic-with-composer)**
>
> How to install Mautic with Composer.

Issues I am facing  
` - mautic/mautic-saelos-bundle[2.0, ..., 2.1] require tightenco/collect ^5.6 -> found tightenco/collect[v5.6.0, ..., v5.8.38] but the package is fixed to v8.83.23 (lock file version) by`

Removing tightenco/collect and installing v5.8.38 says its dependent on mautic/core-lib 4.4.1 requires tightenco/collect ^8.16.0

so installing v5.8.38 in the directory before mautic I get the error  
`tightenco/collect v5.8.38 requires php ^7.1.3 -> your php version (8.0.22) does not satisfy that requirement.`

Getting obscenely frustrated with the migration to composer and the only tutorial/video I have found online is someone actioning it on a local

Are there any tutorials out there that resolve this or go into it in more detail (keen to keep things simple with a control panel for day to day admin)?

… Keen to test out the mautic custom object plugins

---

<div class="post-metadata">

### Author: ![techbill](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/techbill/32/8325_2.png) [@techbill](https://forum.mautic.org/u/techbill)
#### Post date: [August 25, 2022, 1:10pm UTC](https://forum.mautic.org/t/install-via-composer-cloudpanel-headaches/25176/2 "2022-08-25T13:10:48Z")

</div>

Since you are doing new install … try this … grab composer.json file and edit it

You want to edit the path where all the files would be. Since I use cPanel so I edit mine to keep it all in public\_html folder and I don’t know what the cloudpanel file structure are for hosting web sites and your edit may differ.

Here what my composer.json. In cpanel the web sites are rootdoc are the /public\_html/ folder. I had to use absolute path in composer.json for cpanel file structure because for some reason the relative path wouldn’t work at all or threw a bunch of errors.

```auto
{
  "name": "mautic/recommended-project",
  "description": "Project template for Mautic 4 projects with composer",
  "type": "project",
  "license": "GPL-2.0-or-later",
  "homepage": "https://www.mautic.org/mautic-releases",
  "support": {
    "user-docs": "https://docs.mautic.org/en",
    "developer-docs": "https://developer.mautic.org",
    "chat": "https://www.mautic.org/slack"
  },
  "funding": [
    {
      "type": "other",
      "url": "https://opencollective.com/mautic"
    },
    {
      "type": "other",
      "url": "https://github.com/sponsors/mautic"
    }
  ],
  "authors": [
    {
      "name": "",
      "role": ""
    }
  ],
  "require": {
    "composer/installers": "^1.11",
    "mautic/core-composer-scaffold": "4.x-dev",
    "mautic/core-project-message": "4.x-dev",
    "mautic/core-lib": "^4.0",
    "mautic/grapes-js-builder-bundle": "^4.0",
    "mautic/plugin-citrix": "^4.0",
    "mautic/plugin-clearbit": "^4.0",
    "mautic/plugin-cloudstorage": "^4.0",
    "mautic/plugin-crm": "^4.0",
    "mautic/plugin-emailmarketing": "^4.0",
    "mautic/plugin-focus": "^4.0",
    "mautic/plugin-fullcontact": "^4.0",
    "mautic/plugin-gmail": "^4.0",
    "mautic/plugin-outlook": "^4.0",
    "mautic/plugin-social": "^4.0",
    "mautic/plugin-tagmanager": "^4.0",
    "mautic/plugin-zapier": "^4.0",
    "mautic/theme-aurora": "^4.0",
    "mautic/theme-blank": "^4.0",
    "mautic/theme-brienz": "^4.0",
    "mautic/theme-cards": "^4.0",
    "mautic/theme-coffee": "^4.0",
    "mautic/theme-confirmme": "^4.0",
    "mautic/theme-fresh-center": "^4.0",
    "mautic/theme-fresh-fixed": "^4.0",
    "mautic/theme-fresh-left": "^4.0",
    "mautic/theme-fresh-wide": "^4.0",
    "mautic/theme-goldstar": "^4.0",
    "mautic/theme-mauve": "^4.0",
    "mautic/theme-nature": "^4.0",
    "mautic/theme-neopolitan": "^4.0",
    "mautic/theme-oxygen": "^4.0",
    "mautic/theme-paprika": "^4.0",
    "mautic/theme-skyline": "^4.0",
    "mautic/theme-sparse": "^4.0",
    "mautic/theme-sunday": "^4.0",
    "mautic/theme-vibrant": "^4.0",
    "mautic/theme-trulypersonal": "^4.0"
  },
  "repositories": [
    {
      "type": "git",
      "url": "https://github.com/dennisameling/FOSOAuthServerBundle.git"
    }
  ],
  "conflict": {
    "mautic/mautic": "*",
    "mautic/core": "*"
  },
  "minimum-stability": "dev",
  "prefer-stable": true,
  "config": {
    "sort-packages": true,
    "secure-http": false,
    "allow-plugins": {
      "composer/installers": true,
      "symfony/flex": true,
      "mautic/core-composer-scaffold": true,
      "mautic/core-project-message": true
    }
  },
  "autoload": {
    "psr-4": {
      "MauticPlugin\\": "/home/cpanel-user/public_html/plugins/"
    }
  },
  "extra": {
    "mautic-scaffold": {
      "locations": {
        "web-root": "/home/cpanel-user/public_html/"
      }
    },
    "installer-paths": {
      "/home/cpanel-user/public_html/app": [
        "type:mautic-core"
      ],
      "/home/cpanel-user/public_html/plugins/{$name}": [
        "type:mautic-plugin"
      ],
      "/home/cpanel-user/public_html/themes/{$name}": [
        "type:mautic-theme"
      ]
    },
    "mautic-core-project-message": {
      "include-keys": [
        "homepage",
        "support"
      ],
      "post-create-project-cmd-message": [
        "<bg=blue;fg=white> </>",
        "<bg=blue;fg=white> Congratulations, you’ve installed the Mautic codebase </>",
        "<bg=blue;fg=white> from the mautic/recommended-project template! </>",
        "<bg=blue;fg=white> </>",
        "",
        "<bg=yellow;fg=black>Next steps</>:",
        " * Install Mautic",
        " * Read the user guide",
        " * Get support: https://www.mautic.org/support",
        " * Get involved with the Mautic community:",
        " https://www.mautic.org/getting-involved",
        " * Remove the plugin that prints this message:",
        " composer remove mautic/core-project-message"
      ]
    }
  }
}
```

---

<div class="post-metadata">

### Author: ![tornmarketing](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/tornmarketing/32/11603_2.png) [@tornmarketing](https://forum.mautic.org/u/tornmarketing)
#### Post date: [August 26, 2022, 1:11am UTC](https://forum.mautic.org/t/install-via-composer-cloudpanel-headaches/25176/3 "2022-08-26T01:11:16Z")

</div>

Amazing mate, really appreciated

– I am new to composer and didnt expect the learning curve to be so steep

Shall invest a few more hours this weekend with another crack with the above

---

<div class="post-metadata">

### Author: ![dd052](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/dd052/32/663_2.png) [@dd052](https://forum.mautic.org/u/dd052)
#### Post date: [September 1, 2022, 12:13pm UTC](https://forum.mautic.org/t/install-via-composer-cloudpanel-headaches/25176/4 "2022-09-01T12:13:37Z")

</div>

How did you go with the install @tornmarketing?  
I installed Mautic on CloudPanel via their install guide. Everything installed ok but then I started to get errors and permission issues.  
Did you stick with the cloudpanel install?

---

<div class="post-metadata">

### Author: ![tornmarketing](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/tornmarketing/32/11603_2.png) [@tornmarketing](https://forum.mautic.org/u/tornmarketing)
#### Post date: [September 1, 2022, 1:11pm UTC](https://forum.mautic.org/t/install-via-composer-cloudpanel-headaches/25176/5 "2022-09-01T13:11:13Z")

</div>

I didnt use the installer

I have also setup the database to use scalegrid too so externally managed db on a seperate DO droplet

so effectively …

1. Fresh cloudpanel install
2. Add your new domain / SSL etc with the set mautic config
3. Upload the composer.json file (Change out /home/cpanel-user/public\_html for the relevant directory path)
4. down spec php from php8.1 to php8.0 (sudo update-alternatives --config php)
5. composer install
6. bulk update permissions of directory
7. install as per usual via frontend
8. smile 🙂

---

<div class="post-metadata">

### Author: ![dd052](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/dd052/32/663_2.png) [@dd052](https://forum.mautic.org/u/dd052)
#### Post date: [September 1, 2022, 1:43pm UTC](https://forum.mautic.org/t/install-via-composer-cloudpanel-headaches/25176/6 "2022-09-01T13:43:39Z")

</div>

Thanks…I’ll have a go but this might be out of my skill level 😆.  
I was hoping the cloudpanel install guide would work without any mods.

---

<div class="post-metadata">

### Author: ![dd052](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/dd052/32/663_2.png) [@dd052](https://forum.mautic.org/u/dd052)
#### Post date: [September 1, 2022, 9:27pm UTC](https://forum.mautic.org/t/install-via-composer-cloudpanel-headaches/25176/7 "2022-09-01T21:27:48Z")

</div>

Hey @tornmarketing,  
Just confirming, the only thing you changed in the composer.json file discussed above is this to /htdocs/mautic\_directory?  
 ![mautic](https://us1.discourse-cdn.com/flex020/uploads/mautic/original/2X/3/36ecb3e7e2f08b2233093bfef14ac946cb520361.png)

In regards to the bulk update to file permissions, did you just do this in the mautic directory?

![permissions](https://us1.discourse-cdn.com/flex020/uploads/mautic/original/2X/b/b15e2ba398230d9d7c102f582b315f28871387cc.png)

Thanks.

---

<div class="post-metadata">

### Author: ![tornmarketing](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/tornmarketing/32/11603_2.png) [@tornmarketing](https://forum.mautic.org/u/tornmarketing)
#### Post date: [September 2, 2022, 12:52am UTC](https://forum.mautic.org/t/install-via-composer-cloudpanel-headaches/25176/8 "2022-09-02T00:52:45Z")

</div>

Yeah so changed the root in the composer json file

Add to this from your notes  
Depending how you are running the composer you may need to set name/group aswell  
so cloudpanel does this reverse domain thing with system users

so if the domain is [m.domain.com](http://m.domain.com)  
it would be domain-m

All will be shown in the parent folders (I use winscp for all that)

---

<div class="post-metadata">

### Author: ![tornmarketing](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/tornmarketing/32/11603_2.png) [@tornmarketing](https://forum.mautic.org/u/tornmarketing)
#### Post date: [September 8, 2022, 5:01am UTC](https://forum.mautic.org/t/install-via-composer-cloudpanel-headaches/25176/9 "2022-09-08T05:01:31Z")

</div>

> [@tornmarketing](#):
>
> sudo update-alternatives --config php

Had further issues upgrading to the latest version after the install  
Decided to roll the default PHP on the server back to 7.4
