![]() |
CPanel shared hosting with multiple domains - Printable Version +- CodeIgniter Forums (https://forum.codeigniter.com) +-- Forum: Using CodeIgniter (https://forum.codeigniter.com/forumdisplay.php?fid=5) +--- Forum: Installation & Setup (https://forum.codeigniter.com/forumdisplay.php?fid=9) +--- Thread: CPanel shared hosting with multiple domains (/showthread.php?tid=92448) |
CPanel shared hosting with multiple domains - raydoucetjr - 02-10-2025 I read the information on using CI4 with CPanel but I have a bit of an issue. I have several domains within my one CPanel, so my structure works as below
RE: CPanel shared hosting with multiple domains - grimpirate - 02-10-2025 You can test how domains work on your hosting provider by creating a subdomain. Usually the cpanel will have an option for creating it where you can specify which will be its public_html (and its respective name) directory. You could then place your codeigniter directories within/alongside it and place your vendor/, composer.json and composer.lck one directory higher, producing the following structure: /php /public_ftp /public_html /main-domain /ssl /subdomain.yourdomain.com/app /subdomain.yourdomain.com/public /subdomain.yourdomain.com/writable /subdomain.yourdomain.com/spark /subdomain.yourdomain.com/.env /vendor /composer.json /composer.lck More information in the docs:
RE: CPanel shared hosting with multiple domains - raydoucetjr - 02-10-2025 That is, to be perfectly honest, an excellent theory! I'm going to contact my website hosting provider and run that by him to get his feedback! Thank you very much GrimPirate!! RE: CPanel shared hosting with multiple domains - captain-sensible - 02-10-2025 quote : "an excellent theory! " well i have Ci4 running live . The only directoires within a sub directory needed are : app, writable, public and vendor. So on my main hosting i have have up to 20 sub domains. A fully fledged domain name is linked to each sub domain. On my hosting first I have to "manage" domains linked to my account; then use on cPanel "add on domain" on mine that also creates a subdomain. I make the root document public . It all works fine RE: CPanel shared hosting with multiple domains - grimpirate - 02-10-2025 @captain-sensible Your setup would probably work just as well if you moved the vendor directory out of the individual subdomains so that they share it as a common path. The most tangible benefit of keeping your vendor directory inside the subdomain is that you can upgrade each subdomain individually. You may have some reason for doing this but I've found it more productive to upgrade the vendor directory once and then go across each subdomain and make whichever changes are necessary, respectively, to each app. RE: CPanel shared hosting with multiple domains - captain-sensible - 02-11-2025 @grimpirate good idea , im slow to catch on . Seems like yesterday i was using punched cards and Fortran IV lol RE: CPanel shared hosting with multiple domains - grimpirate - 02-12-2025 @captain-sensible Always happy to help a fellow Archer. |