Install via composer - cloudpanel - headaches

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

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

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.

{
  "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"
      ]
    }
  }
}
2 Likes

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

1 Like

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?

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 :slight_smile:
1 Like

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

Hey @tornmarketing,
Just confirming, the only thing you changed in the composer.json file discussed above is this to /htdocs/mautic_directory?
mautic

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

permissions

Thanks.

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
it would be domain-m

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

2 Likes

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