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
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:
cd mautic
php composer.phar require mautic/mautic-saelos-bundle:~2.0
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
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?
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.
Please, provide me with all commands you would use to fully and correctly install Mautic with Composer starting here:
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.
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
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.
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.
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
I looked at the FTP site. I was surprised. An unnamed directory was created, where I think Mautic was implemented.
See here:
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?
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.
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.
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.
I have emptied the whole public_html folder for clean installation.
Edited your composer.json file with my real path which occurred to be /home/555677.cloudwaysapps.com/hjgfecmjsc/public_html/
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
If you could watch the process here: Recordit: Record screencasts fast & free! with GIF Support! and tell me why there are all “Permission denied” and what to do to run this five commands properly?