# Fresh Mautic 4.4.0 via SSH and Composer - problem with installation

**URL:** https://forum.mautic.org/t/fresh-mautic-4-4-0-via-ssh-and-composer-problem-with-installation/24656
**Category:** Mautic 4 Install/Upgrade Support
**Created:** [July 1, 2022, 7:53pm UTC](https://forum.mautic.org/t/fresh-mautic-4-4-0-via-ssh-and-composer-problem-with-installation/24656 "2022-07-01T19:53:40Z")
**Posts on this page:** 20
**Page:** 1

<div class="post-metadata">

### Author: ![gregy1](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/gregy1/32/2029_2.png) [@gregy1](https://forum.mautic.org/u/gregy1)
#### Post date: [July 1, 2022, 7:53pm UTC](https://forum.mautic.org/t/fresh-mautic-4-4-0-via-ssh-and-composer-problem-with-installation/24656/1 "2022-07-01T19:53:40Z")

</div>

**Your software**  
_My PHP version is_ : 7.4.30  
_My MySQL/MariaDB version is_ (delete as applicable): MariaDB version 10.2

**Updating/Installing Errors**  
\*I am: Installing  
\*Installing via: Command Line

_These errors are showing in the installer_ :

**Your problem**

I try to set up a new installation of Mautic v 4.4.0 according to instruction from [Installing with Composer | Mautic](https://docs.mautic.org/en/setup/how-to-install-mautic/install-and-manage-mautic-with-composer)

I decided to use Recommended Project way. I’ve run ‘php composer.phar create-project mautic/recommended-project:^4 mautic --no-interaction’ command (but in my case I’ve change the name of ‘some-dir’ to ‘mautic’ so my installation is in public\_html/mautic/docroot).

During the installation I came across few messages which did not allowed me to fully install the Mautic 4.4.0

These are the “yellow”messages

 ![obraz](https://us1.discourse-cdn.com/flex020/uploads/mautic/original/2X/a/a2fc75f4f1c1f92a083b5699c8db00057606857c.png)

I can not move forward. Usually, after doing this process via command line there was a list of “Next steps” which tells to setup Mautic via browser. Now, there is no such list and don’t know what to do next. Obviously, The Recommended project did not install Mautic as it was told in documentations.

I also did this:

```auto
cd mautic
php composer.phar require mautic/mautic-saelos-bundle:~2.0

```

But those errors occured this time:

 ![obraz](https://us1.discourse-cdn.com/flex020/uploads/mautic/original/2X/7/7d1afb41e7913d136b9a776b2e3ea93463b4ba36.png)

Can you help? How to install fresh copy of Mautic 4.4.0 with Composer?

I am no coder so I would appreciate any step by step hints.

Kind regards, Greg

_Steps I have tried to fix the problem_ : Run this command via SSH ‘php composer.phar create-project mautic/recommended-project:^4 mautic --no-interaction’ and you will see this messages

---

<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: [July 1, 2022, 7:57pm UTC](https://forum.mautic.org/t/fresh-mautic-4-4-0-via-ssh-and-composer-problem-with-installation/24656/2 "2022-07-01T19:57:05Z")

</div>

Are you using shared host like cPanel?

---

<div class="post-metadata">

### Author: ![gregy1](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/gregy1/32/2029_2.png) [@gregy1](https://forum.mautic.org/u/gregy1)
#### Post date: [July 1, 2022, 9:03pm UTC](https://forum.mautic.org/t/fresh-mautic-4-4-0-via-ssh-and-composer-problem-with-installation/24656/3 "2022-07-01T21:03:21Z")

</div>

No, I do not use share hosting. I work on [cloudways.com](http://cloudways.com).

---

<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: [July 1, 2022, 9:12pm UTC](https://forum.mautic.org/t/fresh-mautic-4-4-0-via-ssh-and-composer-problem-with-installation/24656/4 "2022-07-01T21:12:40Z")

</div>

Ignore the previous instruction and try this instruction on Mautic Github instead

> <https://github.com/mautic/recommended-project/pull/18/commits/8087474805de393ade7fb8a08f1b3c062cd1ed3f>

---

<div class="post-metadata">

### Author: ![gregy1](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/gregy1/32/2029_2.png) [@gregy1](https://forum.mautic.org/u/gregy1)
#### Post date: [July 1, 2022, 9:22pm UTC](https://forum.mautic.org/t/fresh-mautic-4-4-0-via-ssh-and-composer-problem-with-installation/24656/5 "2022-07-01T21:22:27Z")

</div>

Thank you, but do not know what to do. If I clean my public\_html folder and want to start from the fresh beginning via ssh …can you tell me what should I enter in my PuTTY console step by step to make the Mautic install correctly?

---

<div class="post-metadata">

### Author: ![gregy1](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/gregy1/32/2029_2.png) [@gregy1](https://forum.mautic.org/u/gregy1)
#### Post date: [July 1, 2022, 9:36pm UTC](https://forum.mautic.org/t/fresh-mautic-4-4-0-via-ssh-and-composer-problem-with-installation/24656/6 "2022-07-01T21:36:33Z")

</div>

Do you mean that I sould do the installation this way:

##### New installations

- Run the `create-project` command without installing

```bash
composer create-project mautic/recommended-project:^4.0 some-dir --no-interaction --no-install

```

- Do a find and replace in the `composer.json` file to change `docroot/` into `public/`.
- Review the changes in the `composer.json` file to ensure there are no unintentional replacements.
- Run `composer install` to install all dependencies in the correct location.

?

---

<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: [July 1, 2022, 10:19pm UTC](https://forum.mautic.org/t/fresh-mautic-4-4-0-via-ssh-and-composer-problem-with-installation/24656/7 "2022-07-01T22:19:32Z")

</div>

Correct

But instead of renaming it to public rename it to public\_html

Then do a composer install in the folder outside of public\_html

---

<div class="post-metadata">

### Author: ![gregy1](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/gregy1/32/2029_2.png) [@gregy1](https://forum.mautic.org/u/gregy1)
#### Post date: [July 2, 2022, 8:58am UTC](https://forum.mautic.org/t/fresh-mautic-4-4-0-via-ssh-and-composer-problem-with-installation/24656/8 "2022-07-02T08:58:04Z")

</div>

Thank you.

Still confused because if I run ‘composer create-project mautic/recommended-project:^4.0 some-dir --no-interaction --no-install’ it will put the composer.json file in the public\_html folder so I would not be able to run composer install outside the public\_html.

Would you be so kind to provide me with the exact commands you would enter in the PuTTY console to obtain this goal?

This is the look at my FTP (FileZilla view below). I want to install Mautic to the “hjgfecmjsc” folder.  
 ![obraz](https://us1.discourse-cdn.com/flex020/uploads/mautic/original/2X/6/6b26f8bacfa7cefd08b78e01b5c6d3032b3f7fea.png)

Please, provide me with all commands you would use to fully and correctly install Mautic with Composer starting here:  
 ![obraz](https://us1.discourse-cdn.com/flex020/uploads/mautic/original/2X/0/00e694a5a4affa7ef24923a677239bd4796c48a2.png)

I have to add that, if I find a composer.json file I will be able to do a “find and replace” action myself:)

I would be grateful for your help and hope your instructions will help a lot of people who cope with the same problem.

Greg

---

<div class="post-metadata">

### Author: ![gregy1](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/gregy1/32/2029_2.png) [@gregy1](https://forum.mautic.org/u/gregy1)
#### Post date: [July 3, 2022, 7:55pm UTC](https://forum.mautic.org/t/fresh-mautic-4-4-0-via-ssh-and-composer-problem-with-installation/24656/9 "2022-07-03T19:55:54Z")

</div>

Dear techbill

I faced one problem: Permission denied to install anything inside the application folder. In my case I’m unable to run composer install outside the public\_html folder.

Nevertheless I tried your way with the hope I would manage to achieve the goal.

For the first approach I got two folders after installation → public\_html/public\_html/

I decided to try other way:  
What I did:  
In public\_html I run this command: php composer.phar create-project mautic/recommended-project:^4.0 mautic --no-interaction --no-install

![obraz](https://us1.discourse-cdn.com/flex020/uploads/mautic/original/2X/c/c37169a2d6c030cd860f8b1bc702f1d169647d64.png)

Then, in composer.json file, instead of doing replacement I delete the “docroot/” and saved the .json file. In the composer.json file now I got:  
“autoload”: {  
“psr-4”: {  
“MauticPlugin\”: “plugins/”  
}  
},  
“extra”: {  
“mautic-scaffold”: {  
“locations”: {  
“web-root”: “”  
}  
},  
“installer-paths”: {  
“app”: [  
“type:mautic-core”  
],  
“plugins/{$name}”: [  
“type:mautic-plugin”  
],  
“themes/{$name}”: [  
“type:mautic-theme”

Than I run command php composer.phar install inside the public\_html folder.

Installation went well till the ending message:

 ![obraz](https://us1.discourse-cdn.com/flex020/uploads/mautic/original/2X/d/d8b454ba74b308b7842acaa0aa2d70484f29165e.png)

Installation of Mautic via browser didn’t worked out as

Can you tell is there a way to do it correctly in my case?

---

<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: [July 3, 2022, 8:41pm UTC](https://forum.mautic.org/t/fresh-mautic-4-4-0-via-ssh-and-composer-problem-with-installation/24656/10 "2022-07-03T20:41:56Z")

</div>

In USA, it’s a holiday weekend but I will get back with your post soon.

---

<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: [July 5, 2022, 10:03pm UTC](https://forum.mautic.org/t/fresh-mautic-4-4-0-via-ssh-and-composer-problem-with-installation/24656/11 "2022-07-05T22:03:10Z")

</div>

If you can only run the composer in within the public\_html folder then edit the composer.json file and use the absolute path instead of deleting anything.

You will need to edit more than one line in composer.json file to update it with absolute path names.

Here an partial example from composer.json

Partial edit around line 90 to line 112 or so … Find all path and edit to change to the absolute path to your public\_html folder

This is only an example so you will need to know your absolute path to edit it property for your server. Once you edited your composer.json then you can place composer.json inside your public\_html folder and do a composer install from there.

```auto
"autoload": {
    "psr-4": {
      "MauticPlugin\\": "/home/username/public_html/plugins/"
    }
  },
  "extra": {
    "mautic-scaffold": {
      "locations": {
        "web-root": "/home/username/public_html/"
      }
    },
    "installer-paths": {
      "/home/username/public_html/app": [
        "type:mautic-core"
      ],
      "/home/username/public_html/plugins/{$name}": [
        "type:mautic-plugin"
      ],
      "/home/username/public_html/themes/{$name}": [
        "type:mautic-theme"
      ]
    },

```

---

<div class="post-metadata">

### Author: ![gregy1](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/gregy1/32/2029_2.png) [@gregy1](https://forum.mautic.org/u/gregy1)
#### Post date: [July 8, 2022, 6:22pm UTC](https://forum.mautic.org/t/fresh-mautic-4-4-0-via-ssh-and-composer-problem-with-installation/24656/12 "2022-07-08T18:22:28Z")

</div>

Dear techbill!

Thank you for your invaluable tips!  
I followed what you provided.

1. In the public\_html folder, I ran the command

> composer create-project mautic/recommended-project:^4.0 mautic-to-install --no-interaction --no-install

1. I edited the composer.json file and replaced “docroot” with an absolute path, which in my case looks like this: **/home/master/applications/hjgfecmjsc/public\_html**

> “autoload”: {  
> “psr-4”: {  
> “MauticPlugin\”: “/home/master/applications/hjgfecmjsc/public\_html/plugins/”  
> }  
> },  
> “extra”: {  
> “mautic-scaffold”: {  
> “locations”: {  
> “web-root”: “/home/master/applications/hjgfecmjsc/public\_html/”  
> }  
> },  
> “installer-paths”: {  
> “/home/master/applications/hjgfecmjsc/public\_html/app”: [  
> “type:mautic-core”  
> ],  
> “/home/master/applications/hjgfecmjsc/public\_html/plugins/{$name}”: [  
> “type:mautic-plugin”  
> ],  
> “/home/master/applications/hjgfecmjsc/public\_html/themes/{$name}”: [  
> “type:mautic-theme”  
> ]  
> },

1. I saved the changed composer.json file directly to the public\_html directory and ran the

> composer install

command.

Here you can see the process (to watch) → [Recordit: Record screencasts fast & free! with GIF Support!](https://recordit.co/TvoQBSQx0q)

I looked at the FTP site. I was surprised. An **unnamed directory** was created, where I think Mautic was implemented.

See here:  
 ![obraz](https://us1.discourse-cdn.com/flex020/uploads/mautic/original/2X/d/d3bbcbfc09ae06e83d736a166861dbd7ce284be7.png)

I can’t run the Mautic installation through the browser.

However, it seems that something in the _composer.json_ file would still need to be changed in order for Mautic to implement itself directly in the public\_html directory and not create a new (unnamed) directory, which you can see in the above screenshot.

Can I ask you for further help in figuring out what to do differently this time to properly install Mautic?

Kind regards,

Greg

---

<div class="post-metadata">

### Author: ![massimo0307](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/massimo0307/32/6285_2.png) [@massimo0307](https://forum.mautic.org/u/massimo0307)
#### Post date: [July 8, 2022, 6:24pm UTC](https://forum.mautic.org/t/fresh-mautic-4-4-0-via-ssh-and-composer-problem-with-installation/24656/13 "2022-07-08T18:24:20Z")

</div>

have you sorted out? same problem here

---

<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: [July 8, 2022, 6:26pm UTC](https://forum.mautic.org/t/fresh-mautic-4-4-0-via-ssh-and-composer-problem-with-installation/24656/14 "2022-07-08T18:26:17Z")

</div>

Let me do a fresh install on cPanel server that not currently in use … give me 15 minutes or around and I will see if there were something introduced into the latest composer install.

---

<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: [July 8, 2022, 6:49pm UTC](https://forum.mautic.org/t/fresh-mautic-4-4-0-via-ssh-and-composer-problem-with-installation/24656/15 "2022-07-08T18:49:57Z")

</div>

Mine seems to be working fine … [https://deafcoder.com](https://deafcoder.com)

I am attaching a copy of mine. - [https://deafcoder.com/composer.zip](https://deafcoder.com/composer.zip)

First, go in terminal to your public\_html folder and if you still have old composer.json file in there then type this command:

> realpath composer.json

It should print out the real path of your composer.json. Edit my composer.json and replace my real path with your real path but don’t include the “composer.json”. Only edit the path then save and upload it to your server.

Type this command:

> composer install --no-interaction

If it doesn’t work then you probably will have to get a different host to use Mautic. Mautic developers does not offer support on shared host.

---

<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: [July 8, 2022, 7:02pm UTC](https://forum.mautic.org/t/fresh-mautic-4-4-0-via-ssh-and-composer-problem-with-installation/24656/16 "2022-07-08T19:02:58Z")

</div>

One last thing to make sure your composer is at least version 2 and higher

Type this command:

> composer --version

---

<div class="post-metadata">

### Author: ![gregy1](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/gregy1/32/2029_2.png) [@gregy1](https://forum.mautic.org/u/gregy1)
#### Post date: [July 9, 2022, 9:57am UTC](https://forum.mautic.org/t/fresh-mautic-4-4-0-via-ssh-and-composer-problem-with-installation/24656/17 "2022-07-09T09:57:03Z")

</div>

Hello techbill!

I have tested Mautic few months ago on my server and it was possible to install it on it without problems. Hosting is telling: “nothing has changed since that time.”  
My Composer version is 2.7

So I did like this.

1. I have emptied the whole public\_html folder for clean installation.
2. Edited your composer.json file with my real path which occurred to be /home/555677.cloudwaysapps.com/hjgfecmjsc/public\_html/

> “autoload”: {  
> “psr-4”: {  
> “MauticPlugin\”: “/home/555677.cloudwaysapps.com/hjgfecmjsc/public\_html/plugins/”  
> }  
> },  
> “extra”: {  
> “mautic-scaffold”: {  
> “locations”: {  
> “web-root”: “/home/555677.cloudwaysapps.com/hjgfecmjsc/public\_html/”  
> }  
> },  
> “installer-paths”: {  
> “/home/555677.cloudwaysapps.com/hjgfecmjsc/public\_html/app”: [  
> “type:mautic-core”  
> ],  
> “/home/555677.cloudwaysapps.com/hjgfecmjsc/public\_html/plugins/{$name}”: [  
> “type:mautic-plugin”  
> ],  
> “/home/555677.cloudwaysapps.com/hjgfecmjsc/public\_html/themes/{$name}”: [  
> “type:mautic-theme”  
> ]  
> },

1. Than, I just uploaded composer.json file to clean public\_html folder and run the command

> composer install --no-interaction

Here is how the process run → [Recordit: Record screencasts fast & free! with GIF Support!](https://recordit.co/dWaWB2FrtE)

1. After all I was able to install Mautic via browser → Ready to install!

_Thank you so, so, so much for your help! It worked out!_ 😀 😀 😀 👍 👍 👍

**If you could support me with one more thing…**

Considering all future updates of Mautic:

What command should I run in my console inside public\_html folder to update Mautic to higher versions when they will be released?

---

<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: [July 11, 2022, 1:27pm UTC](https://forum.mautic.org/t/fresh-mautic-4-4-0-via-ssh-and-composer-problem-with-installation/24656/18 "2022-07-11T13:27:50Z")

</div>

You’re welcome

For me. it’s

> composer update

Some update might need database to be migrated and cache emptied so there are other commands you would want to know when doing a update …

Here some info about updating

[Installing with Composer | Mautic](https://docs.mautic.org/en/setup/how-to-install-mautic/install-and-manage-mautic-with-composer#:~:text=Follow%20the%20steps%20below%20to,and%20restore%20any%20customizations%20to%20).

---

<div class="post-metadata">

### Author: ![gregy1](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/gregy1/32/2029_2.png) [@gregy1](https://forum.mautic.org/u/gregy1)
#### Post date: [July 12, 2022, 2:41pm UTC](https://forum.mautic.org/t/fresh-mautic-4-4-0-via-ssh-and-composer-problem-with-installation/24656/19 "2022-07-12T14:41:56Z")

</div>

Hello!

I have run command:

> composer update

It worked I think…  
…but than I try to run 5 commands that are suggested to run in the 5th point on the list of Updating Mautic Core taken from [Installing with Composer | Mautic](https://docs.mautic.org/en/setup/how-to-install-mautic/install-and-manage-mautic-with-composer#:~:text=Follow%20the%20steps%20below%20to,and%20restore%20any%20customizations%20to%20)  
If you could watch the process here: [Recordit: Record screencasts fast & free! with GIF Support!](https://recordit.co/6rkiW15zlm) and tell me why there are all “Permission denied” and what to do to run this five commands properly?

---

<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: [July 12, 2022, 3:10pm UTC](https://forum.mautic.org/t/fresh-mautic-4-4-0-via-ssh-and-composer-problem-with-installation/24656/20 "2022-07-12T15:10:05Z")

</div>

Try adding  
`php`  
at the beginning of command and not all commands need to be run at every update …

One of the command that should be run after every update is clear cache so add php like this and see if that works for you,

php bin/console cache:clear

[Next page](https://forum.mautic.org/t/fresh-mautic-4-4-0-via-ssh-and-composer-problem-with-installation/24656.md?page=2)
