When we tried installing composer in public_html, it create a new a /docroot/ within the public_html which don’t want since it a sub-domain and we prefer having docroot to be /public_html/
How do we set up composer to install mautic using /public_html/ as the docroot?
Our server is CentOS 7 with cPanel as the web management
We already tried downloading git folder into public_html and did a composer install which works but we noticed that composer update give us errors so we are unable to upgrade it
It does not install htaccess in /public_html/ pointing it to the /docroot/ subfolder so we prefer avoid thig method and have it install in /public_html/ instead of creation of another subfolder to be directed as htaccess
Here the link of folder install in our /public_html/ folder
public_html]$ ls -ls
total 696
0 drwxrwxr-x. 2 techbill techbill 23 May 2 14:54 app
0 drwxrwxr-x. 2 techbill techbill 38 May 2 14:54 bin
4 -rw-rw-r--. 1 techbill techbill 3828 May 2 14:54 composer.json
572 -rw-rw-r--. 1 techbill techbill 585516 May 2 14:53 composer.lock
0 drwxrwxr-x. 7 techbill techbill 229 May 2 14:54 docroot
4 -rw-rw-r--. 1 techbill techbill 1859 May 2 14:54 Gruntfile.js
4 -rw-rw-r--. 1 techbill techbill 424 May 2 14:54 package.json
100 -rw-rw-r--. 1 techbill techbill 101625 May 2 14:54 package-lock.json
8 -rw-rw-r--. 1 techbill techbill 5131 Apr 26 15:20 README.md
4 drwxrwxr-x. 75 techbill techbill 4096 May 2 14:54 vendor
Simply move the folder at the same level of public_html, delete the already present public_html, rename the folder created by Composer to public_html. Done.
Do you mean the other folders need to be on same directory of public_html directory as well too?
When I tried to install it in the folder which the public_html reside in, it give me error folder not empty. It won’t let me install it there unless I delete everything in there which I can’t because it is needed for the cPanel operation to maintain a website for clients.
When I tried to set up Mautic for first time, I get this error
Mautic Installation - Environment Check
Major Problems that need to be fixed now
We have detected 1 major problems. You must fix them before continuing:
Vendor libraries must be installed. If you are running Mautic from source, please run 'composer install'. If you downloaded Mautic, please check for the 'vendor' folder.
I tried different ways and all come up the same result that it’s missing Vendor folders.
It will install Mautic in the correct docroot folder but when I go try to install it for first time then it give me the same error as above. “missing. vendor folder”
I think I got it all sorted … Hopefully but I’m still doing some more testing…
Both cores and docroot need to be install together in public_html folder. It seems that core/bin cannot be install outside of the public_html folder probably due to strange permission setup on cpanel.
But I got mine working by using full cpanel path. We can’t just swap docroot with public_html in composer.json instead we have to use full path as setup in cpanel
composer.json need to be in /public_html/ folder
edit composer.json
replace docroot with /home/cpanel-username/public_html
open cpanel terminal (need to be your own account cpanel terminal to have the correct permission applied to the file during installation in a jailed “garden” account)
composer install --no-interaction
Like I said I haven’t done much testing and I just got it working with composer install.